dnsmasq: Fix CVE-2026-2291
PATCH 1/6 dnsmasq: Fix CVE-2026-2291
From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-2291.patch
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-2291.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://dnsmasq-resolvconf.service \ file://dnsmasq-noresolvconf.service \ file://dnsmasq-resolved.conf \ + file://CVE-2026-2291.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patch new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 2/6 dnsmasq: Fix CVE-2026-4890
From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-4890.patch
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-4890.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://dnsmasq-noresolvconf.service \ file://dnsmasq-resolved.conf \ file://CVE-2026-2291.patch \ + file://CVE-2026-4890.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patch new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [oe][meta-networking][scarthgap][PATCH 2/6] dnsmasq: Fix CVE-2026-4890
Quoted 41 lines · Hugo Simeliere via lists.openembedded.org
From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-4890.patch
Signed-off-by Hugo SIMELIERE (Schneider Electric) <[email protected]>Reviewed-by Bruno VERNAY <[email protected]>--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-4890.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patchmeta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1
-0@@ -17,6 +17,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://dnsmasq-noresolvconf.service \ file://dnsmasq-resolved.conf \ file://CVE-2026-2291.patch \ + file://CVE-2026-4890.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patch new file +8
-0@@ -0,0 +1,75 @@ +From 12e5ee3495842ededf8057758ef8da59745bbf33 Mon Sep 17 00:00:00 2001 +From: Simon Kelley <[email protected]> +Date: Fri, 10 Apr 2026 22:16:45 +0100 +Subject: [PATCH] Fix NSEC bitmap parsing infinite loop. CVE-2026-4890 + +Report from Royce M <[email protected]>. + +Location: dnssec.c:1290-1306, dnssec.c:1450-1463
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patch line 18
Quoted 10 lines
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4890.patch new file +10
-0+ +The bitmap window iteration advances by p[1] instead of p[1]+2 (missing the 2-byte window header). With bitmap_length=0, both rdlen and p are +unchanged, causing an infinite loop and dnsmasq stops responding to all queries. + +The same code accesses p[2] after only checking rdlen >= 2 without verifying p[1] >= 1, causing OOB reads at 6 locations. + +Both bugs are reachable before RRSIG validation (confirmed by the source comment at line 2125), so no valid DNSSEC signatures are needed. + +CVE: CVE-2026-4890 +Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=7b151eb60609a0139474918222806f9bcfb4fe71]
This doesn't look like a simple backport. Can you please add a note with changes done and why?
Thanks,
Anuj
PATCH 3/6 dnsmasq: Fix CVE-2026-4891
In reply to [email protected]From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-4891.patch
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-4891.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-4891.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -18,6 +18,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://dnsmasq-resolved.conf \ file://CVE-2026-2291.patch \ file://CVE-2026-4890.patch \ + file://CVE-2026-4891.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4891.patch new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 4/6 dnsmasq: Fix CVE-2026-4892
In reply to [email protected]From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-4892.patch
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-4892.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://CVE-2026-2291.patch \ file://CVE-2026-4890.patch \ file://CVE-2026-4891.patch \ + file://CVE-2026-4892.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 5/6 dnsmasq: Fix CVE-2026-4893
In reply to [email protected]From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-4893.patch
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-4893.patch | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-4893.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://CVE-2026-4890.patch \ file://CVE-2026-4891.patch \ file://CVE-2026-4892.patch \ + file://CVE-2026-4893.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4893.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 262aadd7a38947d2299234c8c9cf736ff6ad955d Mon Sep 17 00:00:00 2001 +From: Simon Kelley <[email protected]> +Date: Wed, 25 Mar 2026 23:22:37 +0000 +Subject: [PATCH] Fix broken client subnet validation. CVE-2026-4893 + +Bug report from Royce M <[email protected]> + +Location: forward.c:713, edns0.c:421 + +With --add-subnet enabled, process_reply() passes the OPT record +length (~23 bytes) instead of the packet length to check_source(). +All internal bounds checks fail, and the function always returns 1. +ECS source validation per RFC 7871 Section 9.2 is completely bypassed. + +CVE: CVE-2026-4893 +Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=e3a26d092e47bf1d18aeadb758e4ca35c83b5f2d] + +Signed-off-by: Hugo SIMELIERE (Schneider Electric) <[email protected]> +--- + src/forward.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/forward.c b/src/forward.c +index 32f37e40..19ff4401 100644 +--- a/src/forward.c ++++ b/src/forward.c +@@ -710,7 +710,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server + /* Get extended RCODE. */ + rcode |= sizep[2] << 4; + +- if (option_bool(OPT_CLIENT_SUBNET) && !check_source(header, plen, pheader, query_source)) ++ if (option_bool(OPT_CLIENT_SUBNET) && !check_source(header, n, pheader, query_source)) + { + my_syslog(LOG_WARNING, _("discarding DNS reply: subnet option mismatch")); + return 0; +-- +2.43.0 +
Signature · 1 line
2.43.0
PATCH 6/6 dnsmasq: Fix CVE-2026-5172
In reply to [email protected]From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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
--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-5172.patch | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch
meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1 -0
@@ -21,6 +21,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://CVE-2026-4891.patch \ file://CVE-2026-4892.patch \ file://CVE-2026-4893.patch \ + file://CVE-2026-5172.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch new file +39 -0
@@ -0,0 +1,39 @@ +From f158664062e049ec4604f6e772551a00575011f4 Mon Sep 17 00:00:00 2001 +From: Simon Kelley <[email protected]> +Date: Mon, 30 Mar 2026 16:24:33 +0100 +Subject: [PATCH] Fix buffer overflow vulnerability in extract_addresses() + CVE-2026-5172 + +Thanks to Hugo Martinez Ray for spotting this. + +The value of rdlen for an RR can be a lie, allowing the +call to extract_name() at rfc1025.c:952 to advance the value of p1 +past the calculated end of the record. The makes the calculation +of bytes remaining in the RR underflow to a huge number and results +in a massive heap OOB read and certain crash. + +CVE: CVE-2026-5172 +Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=073082ddc0aba7b8efa15a688d6183463b65effa] + +Signed-off-by: Hugo SIMELIERE (Schneider Electric) <[email protected]> +--- + src/rfc1035.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/rfc1035.c b/src/rfc1035.c +index 387d894a..32dc5711 100644 +--- a/src/rfc1035.c ++++ b/src/rfc1035.c +@@ -932,7 +932,8 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t + /* Name, extract it then re-encode. */ + int len; + +- if (!extract_name(header, qlen, &p1, name, 1, 0)) ++ /* rdlen may lie, and extract_name() advances p1 past where it says the record ends. */ ++ if (!extract_name(header, qlen, &p1, name, 1, 0) || (p1 > endrr)) + { + blockdata_free(addr.rrblock.rrdata); + return 2; +-- +2.43.0 +
Signature · 1 line
2.43.0
Quoted 42 lines · Hugo Simeliere via lists.openembedded.org
From: "Hugo SIMELIERE (Schneider Electric)" <[email protected]>
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-2291.patch
Signed-off-by Hugo SIMELIERE (Schneider Electric) <[email protected]>Reviewed-by Bruno VERNAY <[email protected]>--- .../recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 + .../dnsmasq/files/CVE-2026-2291.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patchmeta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb +1
-0@@ -16,6 +16,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV file://dnsmasq-resolvconf.service \ file://dnsmasq-noresolvconf.service \ file://dnsmasq-resolved.conf \ + file://CVE-2026-2291.patch \ " SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patch new file +9
-0@@ -0,0 +1,41 @@ +From c3059821cd52b423592aeffef7935fdf81035a81 Mon Sep 17 00:00:00 2001 +From: Simon Kelley <[email protected]> +Date: Fri, 10 Apr 2026 16:29:31 +0100 +Subject: [PATCH] Fix buffer overflow in struct bigname. CVE-2026-2291 + +All buffers capable of holding a domain name should be +at least MAXDNAME*2 + 1 bytes long, where MAXDNAME is the maximum +size of a domain name. The accounts for the trailing zero and the +fact that some characters are escaped in the internal representation
meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patch line 19
Quoted 10 lines
meta-networking/recipes-support/dnsmasq/files/CVE-2026-2291.patch new file +10
-0+of a domain name in dnsmasq. + +The declaration of struct bigname get this wrong, with the effect +that a remote attacker capable of asking DNS queries or answering DNS +queries can cause a large OOB write in the heap. + +This was first spotted by Andrew S. Fasano. + +CVE: CVE-2026-2291 +Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=014e909f787e808bb35daa546d3f8f3663918de2]
For this as well, please add backport notes.