summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons
diff options
context:
space:
mode:
authorCatalin Enache <catalin.enache@windriver.com>2016-05-23 15:49:34 +0300
committerJoe MacDonald <joe_macdonald@mentor.com>2016-06-01 19:35:50 -0400
commitd46c89ae44c811b64b117613072698601e483b32 (patch)
tree6e77c4047c77d5ae42f413f65da0ee77abb3e5aa /meta-networking/recipes-daemons
parent9a13040d7b10b9f7221f8190e75aa249bfacee9d (diff)
downloadmeta-openembedded-d46c89ae44c811b64b117613072698601e483b32.tar.gz
squid: CVE-2016-4553
client_side.cc in Squid before 3.5.18 and 4.x before 4.0.10 does not properly ignore the Host header when absolute-URI is provided, which allows remote attackers to conduct cache-poisoning attacks via an HTTP request. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4553 Backported upstream patch: http://www.squid-cache.org/Versions/v3/3.5/changesets/squid-3.5-14039.patch Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2016-4553.patch51
-rw-r--r--meta-networking/recipes-daemons/squid/squid_3.5.7.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2016-4553.patch b/meta-networking/recipes-daemons/squid/files/CVE-2016-4553.patch
new file mode 100644
index 000000000..497ace444
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2016-4553.patch
@@ -0,0 +1,51 @@
1From 41ccaa04bb445f52bdb671ef6fbf994634b6efbe Mon Sep 17 00:00:00 2001
2From: Catalin Enache <catalin.enache@windriver.com>
3Date: Mon, 23 May 2016 12:47:39 +0300
4Subject: [PATCH] Bug 4501: HTTP/1.1: normalize Host header
5
6Upstream-Status: Backport
7CVE: CVE-2016-4553
8
9When absolute-URI is provided Host header should be ignored. However some
10code still uses Host directly so normalize it using the URL authority
11value before doing any further request processing.
12
13For now preserve the case where Host is completely absent. That matters
14to the CVE-2009-0801 protection.
15
16This also has the desirable side effect of removing multiple or duplicate
17Host header entries, and invalid port values.
18
19Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
20---
21 src/client_side.cc | 14 ++++++++++++++
22 1 file changed, 14 insertions(+)
23
24diff --git a/src/client_side.cc b/src/client_side.cc
25index 8c41c21..36a27de 100644
26--- a/src/client_side.cc
27+++ b/src/client_side.cc
28@@ -2652,6 +2652,20 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c
29 clientProcessRequestFinished(conn, request);
30 return;
31 }
32+
33+ // when absolute-URI is provided Host header should be ignored. However
34+ // some code still uses Host directly so normalize it.
35+ // For now preserve the case where Host is completely absent. That matters.
36+ if (request->header.has(HDR_HOST)) {
37+ const char *host = request->header.getStr(HDR_HOST);
38+ SBuf authority(request->GetHost());
39+ if (request->port != urlDefaultPort(request->url.getScheme()))
40+ authority.appendf(":%d", request->port);
41+ debugs(33, 5, "URL domain " << authority << " overrides header Host: " << host);
42+ // URL authority overrides Host header
43+ request->header.delById(HDR_HOST);
44+ request->header.putStr(HDR_HOST, authority.c_str());
45+ }
46 }
47
48 // Some blobs below are still HTTP-specific, but we would have to rewrite
49--
502.7.4
51
diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.7.bb b/meta-networking/recipes-daemons/squid/squid_3.5.7.bb
index 750484a7b..b571e29a3 100644
--- a/meta-networking/recipes-daemons/squid/squid_3.5.7.bb
+++ b/meta-networking/recipes-daemons/squid/squid_3.5.7.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P
20 file://run-ptest \ 20 file://run-ptest \
21 file://volatiles.03_squid \ 21 file://volatiles.03_squid \
22 file://CVE-2016-3947.patch \ 22 file://CVE-2016-3947.patch \
23 file://CVE-2016-4553.patch \
23" 24"
24 25
25LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ 26LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \