mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-21 05:57:05 +00:00
bb7620585c
Details: https://nvd.nist.gov/vuln/detail/CVE-2023-46724 Pick the patch from the details of the nvd report. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 7025a946c8795244f8b50a40a84640ca8ed9e321 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Weigel <andreas.weigel@securepoint.de>
|
|
Date: Wed, 18 Oct 2023 04:14:31 +0000
|
|
Subject: [PATCH] Fix validation of certificates with CN=* (#1523)
|
|
|
|
The bug was discovered and detailed by Joshua Rogers at
|
|
https://megamansec.github.io/Squid-Security-Audit/
|
|
where it was filed as "Buffer UnderRead in SSL CN Parsing".
|
|
|
|
CVE: CVE-2023-46724
|
|
Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/792ef23e6e1c05780fe17f733859eef6eb8c8be3]
|
|
|
|
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
|
---
|
|
src/anyp/Uri.cc | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/anyp/Uri.cc b/src/anyp/Uri.cc
|
|
index 54597f1..b0b60cf 100644
|
|
--- a/src/anyp/Uri.cc
|
|
+++ b/src/anyp/Uri.cc
|
|
@@ -173,6 +173,10 @@ urlInitialize(void)
|
|
assert(0 == matchDomainName("*.foo.com", ".foo.com", mdnHonorWildcards));
|
|
assert(0 != matchDomainName("*.foo.com", "foo.com", mdnHonorWildcards));
|
|
|
|
+ assert(0 != matchDomainName("foo.com", ""));
|
|
+ assert(0 != matchDomainName("foo.com", "", mdnHonorWildcards));
|
|
+ assert(0 != matchDomainName("foo.com", "", mdnRejectSubsubDomains));
|
|
+
|
|
/* more cases? */
|
|
}
|
|
|
|
@@ -756,6 +760,8 @@ matchDomainName(const char *h, const char *d, uint8_t flags)
|
|
return -1;
|
|
|
|
dl = strlen(d);
|
|
+ if (dl == 0)
|
|
+ return 1;
|
|
|
|
/*
|
|
* Start at the ends of the two strings and work towards the
|