apache2: cve-2016-5387

Handle HTTP_PROXY envirnoment variable.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Joe Slater 2016-10-27 09:48:43 -07:00 committed by Martin Jansa
parent 87affdd405
commit 6d4ca6868b
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
This patch has been copied from https://www.apache.org/security/asf-httpoxy-response.txt
as a mitigation of CVE-2016-5387.
Upstream-Status: Backport - fixed in 2.4.24
Signed-off-by: Joe Slater<jslater@windriver.com>
--- a/server/util_script.c (revision 1752426)
+++ b/server/util_script.c (working copy)
@@ -186,6 +186,14 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r
else if (!strcasecmp(hdrs[i].key, "Content-length")) {
apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
}
+ /* HTTP_PROXY collides with a popular envvar used to configure
+ * proxies, don't let clients set/override it. But, if you must...
+ */
+#ifndef SECURITY_HOLE_PASS_PROXY
+ else if (!strcasecmp(hdrs[i].key, "Proxy")) {
+ ;
+ }
+#endif
/*
* You really don't want to disable this check, since it leaves you
* wide open to CGIs stealing passwords and people viewing them

View File

@ -17,6 +17,7 @@ SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
file://configure-allow-to-disable-selinux-support.patch \
file://cve-2016-5387.patch \
file://init \
file://apache2-volatile.conf \
file://apache2.service \