summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch')
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch b/meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch
deleted file mode 100644
index 001ca9252..000000000
--- a/meta-webserver/recipes-httpd/apache2/apache2/CVE-2020-35452.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 3b6431eb9c9dba603385f70a2131ab4a01bf0d3b Mon Sep 17 00:00:00 2001
2From: Yann Ylavic <ylavic@apache.org>
3Date: Mon, 18 Jan 2021 17:39:12 +0000
4Subject: [PATCH] Merge r1885659 from trunk:
5
6mod_auth_digest: Fast validation of the nonce's base64 to fail early if
7 the format can't match anyway.
8
9Submitted by: ylavic
10Reviewed by: ylavic, covener, jailletc36
11
12git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa450edef68
13
14Upstream-Status: Backport
15CVE: CVE-2020-35452
16
17Reference to upstream patch:
18https://security-tracker.debian.org/tracker/CVE-2020-35452
19https://github.com/apache/httpd/commit/3b6431eb9c9dba603385f70a2131ab4a01bf0d3b
20
21Signed-off-by: Li Wang <li.wang@windriver.com>
22---
23 modules/aaa/mod_auth_digest.c | 9 +++++++--
24 1 file changed, 7 insertions(+), 2 deletions(-)
25
26diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
27index b760941..0825b1b 100644
28--- a/modules/aaa/mod_auth_digest.c
29+++ b/modules/aaa/mod_auth_digest.c
30@@ -1422,9 +1422,14 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
31 time_rec nonce_time;
32 char tmp, hash[NONCE_HASH_LEN+1];
33
34- if (strlen(resp->nonce) != NONCE_LEN) {
35+ /* Since the time part of the nonce is a base64 encoding of an
36+ * apr_time_t (8 bytes), it should end with a '=', fail early otherwise.
37+ */
38+ if (strlen(resp->nonce) != NONCE_LEN
39+ || resp->nonce[NONCE_TIME_LEN - 1] != '=') {
40 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01775)
41- "invalid nonce %s received - length is not %d",
42+ "invalid nonce '%s' received - length is not %d "
43+ "or time encoding is incorrect",
44 resp->nonce, NONCE_LEN);
45 note_digest_auth_failure(r, conf, resp, 1);
46 return HTTP_UNAUTHORIZED;
47--
482.7.4
49