summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorHugo SIMELIERE (Schneider Electric) <hsimeliere.opensource@witekio.com>2026-05-20 14:29:08 +0200
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-05-21 09:56:21 +0530
commitf1d78e95277e4a74a71a75098da88edb2927b9a6 (patch)
tree547f4cec4b7dc48e4f0145d93807bf0f97e03582 /meta-networking
parent7dda8e9bd75855300f55faa2d803deebac226d43 (diff)
downloadmeta-openembedded-f1d78e95277e4a74a71a75098da88edb2927b9a6.tar.gz
dnsmasq: Fix CVE-2026-5172
Pick patch from [1] dnsmasq 2.90 debian bookworm pacthes. [1] https://sources.debian.org/src/dnsmasq/2.90-4~deb12u2/debian/patches/CVE-2026-5172.patch Signed-off-by: Hugo SIMELIERE (Schneider Electric) <hsimeliere.opensource@witekio.com> Reviewed-by: Bruno VERNAY <bruno.vernay@se.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb1
-rw-r--r--meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch39
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb
index 4e548f6e59..7830c9c81f 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb
@@ -19,6 +19,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV
19 file://CVE-2026-4891.patch \ 19 file://CVE-2026-4891.patch \
20 file://CVE-2026-4892.patch \ 20 file://CVE-2026-4892.patch \
21 file://CVE-2026-4893.patch \ 21 file://CVE-2026-4893.patch \
22 file://CVE-2026-5172.patch \
22" 23"
23SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b" 24SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
24 25
diff --git a/meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch b/meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch
new file mode 100644
index 0000000000..58aac87e4e
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch
@@ -0,0 +1,39 @@
1From f158664062e049ec4604f6e772551a00575011f4 Mon Sep 17 00:00:00 2001
2From: Simon Kelley <simon@thekelleys.org.uk>
3Date: Mon, 30 Mar 2026 16:24:33 +0100
4Subject: [PATCH] Fix buffer overflow vulnerability in extract_addresses()
5 CVE-2026-5172
6
7Thanks to Hugo Martinez Ray for spotting this.
8
9The value of rdlen for an RR can be a lie, allowing the
10call to extract_name() at rfc1025.c:952 to advance the value of p1
11past the calculated end of the record. The makes the calculation
12of bytes remaining in the RR underflow to a huge number and results
13in a massive heap OOB read and certain crash.
14
15CVE: CVE-2026-5172
16Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=073082ddc0aba7b8efa15a688d6183463b65effa]
17
18Signed-off-by: Hugo SIMELIERE (Schneider Electric) <hsimeliere.opensource@witekio.com>
19---
20 src/rfc1035.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/src/rfc1035.c b/src/rfc1035.c
24index 387d894a..32dc5711 100644
25--- a/src/rfc1035.c
26+++ b/src/rfc1035.c
27@@ -932,7 +932,8 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
28 /* Name, extract it then re-encode. */
29 int len;
30
31- if (!extract_name(header, qlen, &p1, name, 1, 0))
32+ /* rdlen may lie, and extract_name() advances p1 past where it says the record ends. */
33+ if (!extract_name(header, qlen, &p1, name, 1, 0) || (p1 > endrr))
34 {
35 blockdata_free(addr.rrblock.rrdata);
36 return 2;
37--
382.43.0
39