diff options
Diffstat (limited to 'meta-networking')
| -rw-r--r-- | meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb | 1 | ||||
| -rw-r--r-- | meta-networking/recipes-support/dnsmasq/files/CVE-2026-5172.patch | 39 |
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 | " |
| 23 | SRC_URI[sha256sum] = "8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b" | 24 | SRC_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 @@ | |||
| 1 | From f158664062e049ec4604f6e772551a00575011f4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Simon Kelley <simon@thekelleys.org.uk> | ||
| 3 | Date: Mon, 30 Mar 2026 16:24:33 +0100 | ||
| 4 | Subject: [PATCH] Fix buffer overflow vulnerability in extract_addresses() | ||
| 5 | CVE-2026-5172 | ||
| 6 | |||
| 7 | Thanks to Hugo Martinez Ray for spotting this. | ||
| 8 | |||
| 9 | The value of rdlen for an RR can be a lie, allowing the | ||
| 10 | call to extract_name() at rfc1025.c:952 to advance the value of p1 | ||
| 11 | past the calculated end of the record. The makes the calculation | ||
| 12 | of bytes remaining in the RR underflow to a huge number and results | ||
| 13 | in a massive heap OOB read and certain crash. | ||
| 14 | |||
| 15 | CVE: CVE-2026-5172 | ||
| 16 | Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=073082ddc0aba7b8efa15a688d6183463b65effa] | ||
| 17 | |||
| 18 | Signed-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 | |||
| 23 | diff --git a/src/rfc1035.c b/src/rfc1035.c | ||
| 24 | index 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 | -- | ||
| 38 | 2.43.0 | ||
| 39 | |||
