[apache2] 01/02: Fix crash in ap_get_useragent_host

Stefan Fritsch sf at moszumanska.debian.org
Sat May 28 09:24:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit aeb68601863f43730a6359e75621395e02de8667
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat May 28 11:00:41 2016 +0200

    Fix crash in ap_get_useragent_host
---
 debian/changelog                                         |  7 +++++++
 debian/patches/ap_get_useragent_host_modperl_crash.patch | 14 ++++++++++++++
 debian/patches/series                                    |  1 +
 3 files changed, 22 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ea45254..7c3aa9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apache2 (2.4.20-2) UNRELEASED; urgency=medium
+
+  * Fix crash in ap_get_useragent_host() triggered by mod_perl test.
+    Closes: #820824
+
+ -- Stefan Fritsch <sf at debian.org>  Sat, 28 May 2016 10:58:26 +0200
+
 apache2 (2.4.20-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/patches/ap_get_useragent_host_modperl_crash.patch b/debian/patches/ap_get_useragent_host_modperl_crash.patch
new file mode 100644
index 0000000..1fc1310
--- /dev/null
+++ b/debian/patches/ap_get_useragent_host_modperl_crash.patch
@@ -0,0 +1,14 @@
+--- apache2.orig/server/core.c
++++ apache2/server/core.c
+@@ -966,7 +966,10 @@ AP_DECLARE(const char *) ap_get_useragen
+     int hostname_lookups;
+     int ignored_str_is_ip;
+ 
+-    if (r->useragent_addr == conn->client_addr) {
++    /* Guard here when examining the host before the read_request hook
++     * has populated an r->useragent_addr
++     */
++    if (!r->useragent_addr || (r->useragent_addr == conn->client_addr)) {
+         return ap_get_remote_host(conn, r->per_dir_config, type, str_is_ip);
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index aa0aae4..d58dec3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ reproducible_builds.diff
 
 # This patch is applied manually
 #suexec-custom.patch
+ap_get_useragent_host_modperl_crash.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list