summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch66
1 files changed, 0 insertions, 66 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch b/meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch
deleted file mode 100644
index 7f74c85e3..000000000
--- a/meta-webserver/recipes-httpd/apache2/apache2/CVE-2021-30641.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From 6141d5aa3f5cf8f1b89472e7fdb66578810d0ae3 Mon Sep 17 00:00:00 2001
2From: Eric Covener <covener@apache.org>
3Date: Wed, 21 Apr 2021 01:02:11 +0000
4Subject: [PATCH] legacy default slash-matching behavior w/ 'MergeSlashes OFF'
5
6git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889036 13f79535-47bb-0310-9956-ffa450edef68
7
8Upstream-Status: Backport
9CVE: CVE-2021-30641
10
11Reference to upstream patch:
12https://httpd.apache.org/security/vulnerabilities_24.html#CVE-2021-30641
13https://github.com/apache/httpd/commit/6141d5aa3f5cf8f1b89472e7fdb66578810d0ae3
14
15Signed-off-by: Li Wang <li.wang@windriver.com>
16---
17 server/request.c | 19 ++++++++++++++++---
18 1 file changed, 16 insertions(+), 3 deletions(-)
19
20diff --git a/server/request.c b/server/request.c
21index d5c558a..18625af 100644
22--- a/server/request.c
23+++ b/server/request.c
24@@ -1419,7 +1419,20 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
25
26 cache = prep_walk_cache(AP_NOTE_LOCATION_WALK, r);
27 cached = (cache->cached != NULL);
28- entry_uri = r->uri;
29+
30+ /*
31+ * When merge_slashes is set to AP_CORE_CONFIG_OFF the slashes in r->uri
32+ * have not been merged. But for Location walks we always go with merged
33+ * slashes no matter what merge_slashes is set to.
34+ */
35+ if (sconf->merge_slashes != AP_CORE_CONFIG_OFF) {
36+ entry_uri = r->uri;
37+ }
38+ else {
39+ char *uri = apr_pstrdup(r->pool, r->uri);
40+ ap_no2slash(uri);
41+ entry_uri = uri;
42+ }
43
44 /* If we have an cache->cached location that matches r->uri,
45 * and the vhost's list of locations hasn't changed, we can skip
46@@ -1486,7 +1499,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
47 pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
48 }
49
50- if (ap_regexec(entry_core->r, entry_uri, nmatch, pmatch, 0)) {
51+ if (ap_regexec(entry_core->r, r->uri, nmatch, pmatch, 0)) {
52 continue;
53 }
54
55@@ -1496,7 +1509,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
56 apr_table_setn(r->subprocess_env,
57 ((const char **)entry_core->refs->elts)[i],
58 apr_pstrndup(r->pool,
59- entry_uri + pmatch[i].rm_so,
60+ r->uri + pmatch[i].rm_so,
61 pmatch[i].rm_eo - pmatch[i].rm_so));
62 }
63 }
64--
652.7.4
66