diff -Nru squid3-3.5.27/debian/changelog squid3-3.5.27/debian/changelog --- squid3-3.5.27/debian/changelog 2020-07-28 16:38:51.000000000 +0000 +++ squid3-3.5.27/debian/changelog 2020-08-25 17:12:13.000000000 +0000 @@ -1,3 +1,12 @@ +squid3 (3.5.27-1ubuntu1.8) bionic-security; urgency=medium + + * SECURITY REGRESSION: regression when parsing icap and ecap protocols + (LP: #1890265) + - debian/patches/CVE-2019-12523-bug965012.patch + * Thanks to Markus Koschany for the regression fix! + + -- Marc Deslauriers Tue, 25 Aug 2020 13:12:13 -0400 + squid3 (3.5.27-1ubuntu1.7) bionic-security; urgency=medium * SECURITY UPDATE: Multiple Issues in HTTP Request processing diff -Nru squid3-3.5.27/debian/patches/CVE-2019-12523-bug965012.patch squid3-3.5.27/debian/patches/CVE-2019-12523-bug965012.patch --- squid3-3.5.27/debian/patches/CVE-2019-12523-bug965012.patch 1970-01-01 00:00:00.000000000 +0000 +++ squid3-3.5.27/debian/patches/CVE-2019-12523-bug965012.patch 2020-08-25 17:12:13.000000000 +0000 @@ -0,0 +1,71 @@ +From: Markus Koschany +Date: Wed, 12 Aug 2020 20:23:26 +0200 +Subject: CVE-2019-12523 bug965012 + +--- + src/adaptation/icap/ModXact.cc | 4 +++- + src/anyp/ProtocolType.cc | 4 ++++ + src/anyp/ProtocolType.h | 4 ++++ + src/url.cc | 12 ++++++++++++ + 4 files changed, 23 insertions(+), 1 deletion(-) + +--- a/src/adaptation/icap/ModXact.cc ++++ b/src/adaptation/icap/ModXact.cc +@@ -1540,7 +1540,9 @@ void Adaptation::Icap::ModXact::encapsul + if (const HttpRequest* old_request = dynamic_cast(head)) { + HttpRequest::Pointer new_request(new HttpRequest); + Must(old_request->canonical); +- urlParse(old_request->method, SBuf(old_request->canonical), new_request.getRaw()); ++ // copy the requst-line details ++ new_request->method = old_request->method; ++ new_request->url = old_request->url; + new_request->http_ver = old_request->http_ver; + headClone = new_request.getRaw(); + } else if (const HttpReply *old_reply = dynamic_cast(head)) { +--- a/src/anyp/ProtocolType.cc ++++ b/src/anyp/ProtocolType.cc +@@ -24,6 +24,10 @@ const char * ProtocolType_str[] = { + "WHOIS", + "ICY", + "UNKNOWN", ++ "ICAP", ++ "ICAPS", ++ "ECAP", ++ "ECAPS", + "MAX" + }; + }; // namespace AnyP +--- a/src/anyp/ProtocolType.h ++++ b/src/anyp/ProtocolType.h +@@ -37,6 +37,10 @@ typedef enum { + PROTO_WHOIS, + PROTO_ICY, + PROTO_UNKNOWN, ++ PROTO_ICAP, ++ PROTO_ICAPS, ++ PROTO_ECAP, ++ PROTO_ECAPS, + PROTO_MAX + } ProtocolType; + +--- a/src/url.cc ++++ b/src/url.cc +@@ -180,6 +180,18 @@ urlParseProtocol(const SBuf & protocol) + if (strncasecmp(b, "whois", len) == 0) + return AnyP::PROTO_WHOIS; + ++ if (strncasecmp(b, "icap", len) == 0) ++ return AnyP::PROTO_ICAP; ++ ++ if (strncasecmp(b, "icaps", len) == 0) ++ return AnyP::PROTO_ICAPS; ++ ++ if (strncasecmp(b, "ecap", len) == 0) ++ return AnyP::PROTO_ECAP; ++ ++ if (strncasecmp(b, "ecaps", len) == 0) ++ return AnyP::PROTO_ECAPS; ++ + return AnyP::PROTO_NONE; + } + diff -Nru squid3-3.5.27/debian/patches/series squid3-3.5.27/debian/patches/series --- squid3-3.5.27/debian/patches/series 2020-07-28 16:38:51.000000000 +0000 +++ squid3-3.5.27/debian/patches/series 2020-08-25 17:12:13.000000000 +0000 @@ -21,3 +21,4 @@ CVE-2020-11945.patch CVE-2019-12520.patch CVE-2019-12523.patch +CVE-2019-12523-bug965012.patch