diff options
author | Peter Marko <peter.marko@siemens.com> | 2024-08-04 23:03:51 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-08-21 16:45:29 -0400 |
commit | be2127dce57882ffcc6eb1e6e4af18afb89429f4 (patch) | |
tree | f64e07e2e1e4a75ee0aa65a8e977d319a40ff266 | |
parent | 8887a98d27639c694ff0eeb9eb8be66dcb034542 (diff) | |
download | meta-openembedded-be2127dce57882ffcc6eb1e6e4af18afb89429f4.tar.gz |
squid: patch CVE-2024-37894
Reference: https://github.com/squid-cache/squid/security/advisories/GHSA-wgvf-q977-9xjg
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch | 36 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/squid/squid_6.9.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch b/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch new file mode 100644 index 0000000000..ba12b71d6f --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/CVE-2024-37894.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 920563e7a080155fae3ced73d6198781e8b0ff04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> | ||
3 | Date: Sun, 2 Jun 2024 14:41:16 +0000 | ||
4 | Subject: [PATCH] Bug 5378: type mismatch in libTrie (#1830) | ||
5 | |||
6 | TrieNode::add() incorrectly computed an offset of an internal data | ||
7 | structure, resulting in out-of-bounds memory accesses that could cause | ||
8 | corruption or crashes. | ||
9 | |||
10 | This bug was discovered and detailed by Joshua Rogers at | ||
11 | https://megamansec.github.io/Squid-Security-Audit/esi-underflow.html | ||
12 | where it was filed as "Buffer Underflow in ESI". | ||
13 | |||
14 | CVE: CVE-2024-37894 | ||
15 | Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/920563e7a080155fae3ced73d6198781e8b0ff04] | ||
16 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
17 | --- | ||
18 | lib/libTrie/TrieNode.cc | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/lib/libTrie/TrieNode.cc b/lib/libTrie/TrieNode.cc | ||
22 | index 0f991a06d..d417e0f54 100644 | ||
23 | --- a/lib/libTrie/TrieNode.cc | ||
24 | +++ b/lib/libTrie/TrieNode.cc | ||
25 | @@ -32,7 +32,7 @@ TrieNode::add(char const *aString, size_t theLength, void *privatedata, TrieChar | ||
26 | /* We trust that privatedata and existent keys have already been checked */ | ||
27 | |||
28 | if (theLength) { | ||
29 | - int index = transform ? (*transform)(*aString): *aString; | ||
30 | + const unsigned char index = transform ? (*transform)(*aString): *aString; | ||
31 | |||
32 | if (!internal[index]) | ||
33 | internal[index] = new TrieNode; | ||
34 | -- | ||
35 | 2.30.2 | ||
36 | |||
diff --git a/meta-networking/recipes-daemons/squid/squid_6.9.bb b/meta-networking/recipes-daemons/squid/squid_6.9.bb index 33d286e122..61fc6027b3 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.9.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.9.bb | |||
@@ -20,6 +20,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \ | |||
20 | file://volatiles.03_squid \ | 20 | file://volatiles.03_squid \ |
21 | file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ | 21 | file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ |
22 | file://squid.nm \ | 22 | file://squid.nm \ |
23 | file://CVE-2024-37894.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | SRC_URI[sha256sum] = "1ad72d46e1cb556e9561214f0fb181adb87c7c47927ef69bc8acd68a03f61882" | 26 | SRC_URI[sha256sum] = "1ad72d46e1cb556e9561214f0fb181adb87c7c47927ef69bc8acd68a03f61882" |