]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1753228 from trunk:
authorYann Ylavic <ylavic@apache.org>
Tue, 16 Aug 2016 23:32:35 +0000 (23:32 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 16 Aug 2016 23:32:35 +0000 (23:32 +0000)
httpoxy workarounds, first draft patch as published for all 2.2.x+ sources

Submitted by: Dominic Scheirlinck <dominic vendhq.com>, ylavic
Reviewed by: wrowe, rpluem, ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1756564 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
docs/conf/httpd.conf.in
server/util_script.c

diff --git a/CHANGES b/CHANGES
index a26e0895e262c98e2ab2da28af0c61b1d185702c..cd1f8f60bb813a8d2fa3362ac334663f82904aaa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.32
 
+  *) core: CVE-2016-5387: Mitigate [f]cgi "httpoxy" issues.
+     [Dominic Scheirlinck <dominic vendhq.com>, Yann Ylavic]
+
   *) mod_ssl: Fix a possible memory leak on restart for custom [EC]DH params.
      [Jan Kaluza, Yann Ylavic]
 
diff --git a/STATUS b/STATUS
index 0dc3b221ca06054378c21c3e59ec7fcf8bf6ecae..0b07390156971e83239d9bfa23aef35da6985825 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -103,13 +103,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) core: CVE-2016-5387: Mitigate [f]cgi "httpoxy" issues
-      Trunk version of patch:
-         http://svn.apache.org/viewvc?rev=1753228&view=rev
-      Backport version for 2.4.x of patch:
-         Trunk version of patch works (modulo CHANGES)
-      +1: wrowe, rpluem, ylavic
-
   *) mod_mem_cache: Don't cache incomplete responses when the client aborts
                     the connection, unless they are complete.  PR 45049.
      Not applicable to trunk, mod_mem_cache doesn't exist there.
index 5639a1ffac26e24ada2084ee4f377ab2292f2810..8b5efde27c32b7bb9dda765684e17622f76329c5 100644 (file)
@@ -284,6 +284,15 @@ LogLevel warn
 #
 DefaultType text/plain
 
+<IfModule headers_module>
+    #
+    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
+    # backend servers which have lingering "httpoxy" defects.
+    # 'Proxy' request header is undefined by the IETF, not listed by IANA
+    #
+    RequestHeader unset Proxy early
+</IfModule>
+
 <IfModule mime_module>
     #
     # TypesConfig points to the file containing the list of mappings from
index 925342c4940481dbd581de5c83d37785b65eee95..90af7ca6ee83cb309ffee26631365d7b10f7c390 100644 (file)
@@ -165,6 +165,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