summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-10-21 20:32:01 +0200
committerGyorgy Sarvari <skandigraun@gmail.com>2025-10-27 11:17:25 +0100
commit4c30475f5d81fd3b01e93b6f0142bdf5ea7da93d (patch)
tree2ba7cf3922c8f382d0af89f9d7d10a95048401ff /meta-networking
parent3183e6799930c20d0a85048817f3ba2ab346f6a7 (diff)
downloadmeta-openembedded-4c30475f5d81fd3b01e93b6f0142bdf5ea7da93d.tar.gz
squid: patch CVE-2022-41318
Details: https://nvd.nist.gov/vuln/detail/CVE-2022-41318 Pick the v4 patch referenced in the nvd report. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2022-41318.patch45
-rw-r--r--meta-networking/recipes-daemons/squid/squid_4.15.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2022-41318.patch b/meta-networking/recipes-daemons/squid/files/CVE-2022-41318.patch
new file mode 100644
index 0000000000..c1cf699d05
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2022-41318.patch
@@ -0,0 +1,45 @@
1From 36a55f44abe5ee0387d83663397e7fe111e21fa4 Mon Sep 17 00:00:00 2001
2From: Amos Jeffries <yadij@users.noreply.github.com>
3Date: Tue, 9 Aug 2022 23:34:54 +0000
4Subject: [PATCH] Bug 3193 pt2: NTLM decoder truncating strings (#1114)
5
6The initial bug fix overlooked large 'offset' causing integer
7wrap to extract a too-short length string.
8
9Improve debugs and checks sequence to clarify cases and ensure
10that all are handled correctly.
11
12CVE: CVE-2022-41318
13Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/4031c6c2b004190fdffbc19dab7cd0305a2025b7]
14
15Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
16---
17 lib/ntlmauth/ntlmauth.cc | 13 +++++++++++--
18 1 file changed, 11 insertions(+), 2 deletions(-)
19
20diff --git a/lib/ntlmauth/ntlmauth.cc b/lib/ntlmauth/ntlmauth.cc
21index 5d96372..f00fd51 100644
22--- a/lib/ntlmauth/ntlmauth.cc
23+++ b/lib/ntlmauth/ntlmauth.cc
24@@ -107,10 +107,19 @@ ntlm_fetch_string(const ntlmhdr *packet, const int32_t packet_size, const strhdr
25 int32_t o = le32toh(str->offset);
26 // debug("ntlm_fetch_string(plength=%d,l=%d,o=%d)\n",packet_size,l,o);
27
28- if (l < 0 || l > NTLM_MAX_FIELD_LENGTH || o + l > packet_size || o == 0) {
29- debug("ntlm_fetch_string: insane data (pkt-sz: %d, fetch len: %d, offset: %d)\n", packet_size,l,o);
30+ if (l < 0 || l > NTLM_MAX_FIELD_LENGTH) {
31+ debug("ntlm_fetch_string: insane string length (pkt-sz: %d, fetch len: %d, offset: %d)\n", packet_size,l,o);
32 return rv;
33 }
34+ else if (o <= 0 || o > packet_size) {
35+ debug("ntlm_fetch_string: insane string offset (pkt-sz: %d, fetch len: %d, offset: %d)\n", packet_size,l,o);
36+ return rv;
37+ }
38+ else if (l > packet_size - o) {
39+ debug("ntlm_fetch_string: truncated string data (pkt-sz: %d, fetch len: %d, offset: %d)\n", packet_size,l,o);
40+ return rv;
41+ }
42+
43 rv.str = (char *)packet + o;
44 rv.l = 0;
45 if ((flags & NTLM_NEGOTIATE_ASCII) == 0) {
diff --git a/meta-networking/recipes-daemons/squid/squid_4.15.bb b/meta-networking/recipes-daemons/squid/squid_4.15.bb
index 4cb21187fc..9ac420d579 100644
--- a/meta-networking/recipes-daemons/squid/squid_4.15.bb
+++ b/meta-networking/recipes-daemons/squid/squid_4.15.bb
@@ -35,6 +35,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2
35 file://CVE-2023-5824.patch \ 35 file://CVE-2023-5824.patch \
36 file://CVE-2021-46784.patch \ 36 file://CVE-2021-46784.patch \
37 file://CVE-2022-41317.patch \ 37 file://CVE-2022-41317.patch \
38 file://CVE-2022-41318.patch \
38 " 39 "
39 40
40SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" 41SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"