summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Bachiphale <Abhishek.Bachiphale@windriver.com>2026-05-23 17:00:22 +1200
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-05-29 09:29:32 +0530
commitbe8d0f006a3153922e2e59b195940efb8e1e47b8 (patch)
treedfb86208fb812660d0c899ce8ad90564884a5abb
parent81572e132c1f78b8c153ded144f808f8a828e6c2 (diff)
downloadmeta-openembedded-be8d0f006a3153922e2e59b195940efb8e1e47b8.tar.gz
dnsmasq: fix CVE-2026-4892
A heap-based out-of-bounds write vulnerability in the DHCPv6 implementation of dnsmasq allows local attackers to execute arbitrary code with root privileges via a crafted DHCPv6 packet. Reference: [ https://nvd.nist.gov/vuln/detail/CVE-2026-4892 ] Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> (cherry picked from commit 21c3d7eb6f94f967b5e02fc61cc027d3893764a0) Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq_2.92.bb1
-rw-r--r--meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch36
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.92.bb b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.92.bb
index 0de434036a..4060941ad2 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.92.bb
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.92.bb
@@ -16,6 +16,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV
16 file://dnsmasq-noresolvconf.service \ 16 file://dnsmasq-noresolvconf.service \
17 file://dnsmasq-resolved.conf \ 17 file://dnsmasq-resolved.conf \
18 file://CVE-2026-4891.patch \ 18 file://CVE-2026-4891.patch \
19 file://CVE-2026-4892.patch \
19" 20"
20SRC_URI[sha256sum] = "fd908e79ff37f73234afcb6d3363f78353e768703d92abd8e3220ade6819b1e1" 21SRC_URI[sha256sum] = "fd908e79ff37f73234afcb6d3363f78353e768703d92abd8e3220ade6819b1e1"
21 22
diff --git a/meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch b/meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch
new file mode 100644
index 0000000000..01637601a3
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch
@@ -0,0 +1,36 @@
1commit 011a36c51438c986535a7248ed2e7f424f8e1078
2Author: Simon Kelley <simon@thekelleys.org.uk>
3Date: Wed Mar 25 23:16:35 2026 +0000
4
5Fix buffer overflow in helper.c with large CLIDs. CVE-2026-4892
6
7Bug reported bt Royce M <royce@xchglabs.com>
8
9Location: helper.c:265-270
10DHCPv6 CLIDs can be up to 65535 bytes. When --dhcp-script is configured,
11the helper hex-encodes raw CLID bytes via sprintf("%.2x") into daemon->packet (5131 bytes).
12A 1000-byte CLID writes ~3000 bytes. The helper process retains root privileges.
13
14Note: log6_packet() correctly caps CLID to 100 bytes for logging, but the helper code path was missed.
15
16CVE: CVE-2026-4892
17
18Upstream-Status: Backport [ https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=10e6b5b83e80749cba7b090d7780b29f908f0571 ]
19
20Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com>
21
22diff --git a/src/helper.c b/src/helper.c
23index 72f81fe..2c12801 100644
24--- a/src/helper.c
25+++ b/src/helper.c
26@@ -261,8 +261,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
27 data.hostname_len + data.ed_len + data.clid_len, RW_READ))
28 continue;
29
30- /* CLID into packet */
31- for (p = daemon->packet, i = 0; i < data.clid_len; i++)
32+ /* CLID into packet: limit to 100 bytes to avoid overflowing buffer. */
33+ for (p = daemon->packet, i = 0; i < data.clid_len && i < 100; i++)
34 {
35 p += sprintf(p, "%.2x", buf[i]);
36 if (i != data.clid_len - 1)