Your message dated Sat, 14 Jul 2018 11:21:20 +0100 with message-id <1531563680.2095.30.camel@adam-barratt.org.uk> and subject line Closing bugs for updates included in 9.5 has caused the Debian Bug report #903088, regarding stretch-pu: package xapian-core/1.4.3-2 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 903088: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903088 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: stretch-pu: package xapian-core/1.4.3-2
- From: Olly Betts <olly@survex.com>
- Date: Fri, 6 Jul 2018 10:17:13 +1200
- Message-id: <[🔎] 20180705221713.GA15106@survex.com>
Package: release.debian.org Severity: normal Tags: stretch User: release.debian.org@packages.debian.org Usertags: pu This proposed update fixes CVE-2018-0499, an incomplete HTML escaping bug in xapian-core. I've discussed with the security-team and they proposed fixing this via the imminent stretch point release. The Debian bug is https://bugs.debian.org/902886 which has severity important and is already fixed in unstable by version 1.4.6-1. The patch was in an upstream release and vulnerability disclosure 4 days ago and has been in unstable for 3 days now, without any problems reported to the BTS or to upstream. A source debdiff of the proposed update xapian-core 1.4.3-2+deb9u1 is attached. I've already uploaded this (in line with the updated SPU workflow). Cheers, Ollydiff -Nru xapian-core-1.4.3/debian/changelog xapian-core-1.4.3/debian/changelog --- xapian-core-1.4.3/debian/changelog 2017-04-06 06:48:18.000000000 +1200 +++ xapian-core-1.4.3/debian/changelog 2018-07-06 09:52:48.000000000 +1200 @@ -1,3 +1,10 @@ +xapian-core (1.4.3-2+deb9u1) stretch; urgency=medium + + * Fix MSet::snippet() to escape HTML in all cases (CVE-2018-499). + New patch: cve-2018-0499-mset-snippet-escaping.patch (Closes: #902886) + + -- Olly Betts <olly@survex.com> Fri, 06 Jul 2018 09:52:48 +1200 + xapian-core (1.4.3-2) unstable; urgency=medium * Fix incorrect results for unweighted AND with certain subqueries (new diff -Nru xapian-core-1.4.3/debian/patches/cve-2018-0499-mset-snippet-escaping.patch xapian-core-1.4.3/debian/patches/cve-2018-0499-mset-snippet-escaping.patch --- xapian-core-1.4.3/debian/patches/cve-2018-0499-mset-snippet-escaping.patch 1970-01-01 12:00:00.000000000 +1200 +++ xapian-core-1.4.3/debian/patches/cve-2018-0499-mset-snippet-escaping.patch 2018-07-06 09:52:24.000000000 +1200 @@ -0,0 +1,110 @@ +Description: Fix incomplete HTML escaping in MSet::snippet() + Characters <, > and & were escaped in some cases, but not all - this patch + adds escaping in the missing cases. This issue has been allocated + CVE-2018-0499. +Author: Olly Betts <olly@survex.com> +Bug-Debian: https://bugs.debian.org/902886 +Origin: upstream +Last-Update: 2018-07-06 + +--- a/queryparser/termgenerator_internal.cc ++++ b/queryparser/termgenerator_internal.cc +@@ -432,6 +432,27 @@ SnipPipe::done() + } + } + ++inline void ++append_escaping_xml(const char* p, const char* end, string& output) ++{ ++ while (p != end) { ++ char ch = *p++; ++ switch (ch) { ++ case '&': ++ output += "&"; ++ break; ++ case '<': ++ output += "<"; ++ break; ++ case '>': ++ output += ">"; ++ break; ++ default: ++ output += ch; ++ } ++ } ++} ++ + inline bool + SnipPipe::drain(const string & input, + const string & hi_start, +@@ -465,7 +486,7 @@ SnipPipe::drain(const string & input, + + if (punc) { + // Include end of sentence punctuation. +- output.append(input.data() + best_end, i.raw()); ++ append_escaping_xml(input.data() + best_end, i.raw(), output); + } else { + // Append "..." or equivalent if this doesn't seem to be the start + // of a sentence. +@@ -523,8 +544,7 @@ SnipPipe::drain(const string & input, + while (i != Utf8Iterator()) { + unsigned ch = *i; + if (Unicode::is_wordchar(ch)) { +- const char * p = input.data() + best_begin; +- output.append(p, i.raw() - p); ++ append_escaping_xml(input.data() + best_begin, i.raw(), output); + best_begin = i.raw() - input.data(); + break; + } +@@ -537,22 +557,9 @@ SnipPipe::drain(const string & input, + if (phrase_len) output += hi_start; + } + +- while (best_begin != word.term_end) { +- char ch = input[best_begin++]; +- switch (ch) { +- case '&': +- output += "&"; +- break; +- case '<': +- output += "<"; +- break; +- case '>': +- output += ">"; +- break; +- default: +- output += ch; +- } +- } ++ const char* p = input.data(); ++ append_escaping_xml(p + best_begin, p + word.term_end, output); ++ best_begin = word.term_end; + + if (phrase_len && --phrase_len == 0) output += hi_end; + +--- a/tests/api_snippets.cc ++++ b/tests/api_snippets.cc +@@ -313,3 +313,23 @@ DEFINE_TESTCASE(snippet_empty, backend) { + + return true; + } ++ ++/// Check snippets escape HTML/XML suitably. ++DEFINE_TESTCASE(snippet_html_escape, backend) { ++ Xapian::Enquire enquire(get_database("apitest_simpledata")); ++ enquire.set_query(Xapian::Query("foo")); ++ ++ Xapian::MSet mset = enquire.get_mset(0, 0); ++ ++ Xapian::Stem stem; ++ ++ const char *input = "#include <foo.h> to use libfoo"; ++ TEST_STRINGS_EQUAL(mset.snippet(input, 12, stem), ++ "...<<b>foo</b>.h> to..."); ++ ++ input = "&foo takes the address of foo"; ++ TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem), ++ "&<b>foo</b> takes the address of <b>foo</b>"); ++ ++ return true; ++} diff -Nru xapian-core-1.4.3/debian/patches/series xapian-core-1.4.3/debian/patches/series --- xapian-core-1.4.3/debian/patches/series 2017-04-06 06:48:13.000000000 +1200 +++ xapian-core-1.4.3/debian/patches/series 2018-07-06 09:47:57.000000000 +1200 @@ -1 +1,2 @@ fix-unweighted-and.patch +cve-2018-0499-mset-snippet-escaping.patchAttachment: signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
- To: 873330-done@bugs.debian.org, 880037-done@bugs.debian.org, 882197-done@bugs.debian.org, 885333-done@bugs.debian.org, 885617-done@bugs.debian.org, 887160-done@bugs.debian.org, 888766-done@bugs.debian.org, 888909-done@bugs.debian.org, 889940-done@bugs.debian.org, 890791-done@bugs.debian.org, 891415-done@bugs.debian.org, 891466-done@bugs.debian.org, 891470-done@bugs.debian.org, 891559-done@bugs.debian.org, 891563-done@bugs.debian.org, 891576-done@bugs.debian.org, 891580-done@bugs.debian.org, 891587-done@bugs.debian.org, 891655-done@bugs.debian.org, 891658-done@bugs.debian.org, 891668-done@bugs.debian.org, 891772-done@bugs.debian.org, 891784-done@bugs.debian.org, 891788-done@bugs.debian.org, 891791-done@bugs.debian.org, 891793-done@bugs.debian.org, 892278-done@bugs.debian.org, 892734-done@bugs.debian.org, 892836-done@bugs.debian.org, 892857-done@bugs.debian.org, 892940-done@bugs.debian.org, 893043-done@bugs.debian.org, 893278-done@bugs.debian.org, 893803-done@bugs.debian.org, 893866-done@bugs.debian.org, 893971-done@bugs.debian.org, 894713-done@bugs.debian.org, 894960-done@bugs.debian.org, 894971-done@bugs.debian.org, 895596-done@bugs.debian.org, 895766-done@bugs.debian.org, 895846-done@bugs.debian.org, 895888-done@bugs.debian.org, 895936-done@bugs.debian.org, 896170-done@bugs.debian.org, 896689-done@bugs.debian.org, 896918-done@bugs.debian.org, 896940-done@bugs.debian.org, 896945-done@bugs.debian.org, 897188-done@bugs.debian.org, 897368-done@bugs.debian.org, 897912-done@bugs.debian.org, 897923-done@bugs.debian.org, 899006-done@bugs.debian.org, 899014-done@bugs.debian.org, 900920-done@bugs.debian.org, 901033-done@bugs.debian.org, 901089-done@bugs.debian.org, 901192-done@bugs.debian.org, 901288-done@bugs.debian.org, 901331-done@bugs.debian.org, 901355-done@bugs.debian.org, 901426-done@bugs.debian.org, 901476-done@bugs.debian.org, 901639-done@bugs.debian.org, 901811-done@bugs.debian.org, 902042-done@bugs.debian.org, 902282-done@bugs.debian.org, 902283-done@bugs.debian.org, 902294-done@bugs.debian.org, 902319-done@bugs.debian.org, 902325-done@bugs.debian.org, 902326-done@bugs.debian.org, 902688-done@bugs.debian.org, 902758-done@bugs.debian.org, 902832-done@bugs.debian.org, 903005-done@bugs.debian.org, 903015-done@bugs.debian.org, 903037-done@bugs.debian.org, 903052-done@bugs.debian.org, 903088-done@bugs.debian.org, 903199-done@bugs.debian.org, 903203-done@bugs.debian.org, 903216-done@bugs.debian.org, 859731-done@bugs.debian.org, 899189-done@bugs.debian.org, 901744-done@bugs.debian.org
- Subject: Closing bugs for updates included in 9.5
- From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
- Date: Sat, 14 Jul 2018 11:21:20 +0100
- Message-id: <1531563680.2095.30.camel@adam-barratt.org.uk>
Version: 9.5 Hi, The update referenced by each of these bugs was included in this morning's stretch point release. Regards, Adam
--- End Message ---