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

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-4892.patch         | 41 +++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 
meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch

diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb 
b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.90.bb
index ed8708c339..e08d9df18e 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
            file://CVE-2026-2291.patch \
            file://CVE-2026-4890.patch \
            file://CVE-2026-4891.patch \
+           file://CVE-2026-4892.patch \
 "
 SRC_URI[sha256sum] = 
"8f6666b542403b5ee7ccce66ea73a4a51cf19dd49392aaccd37231a2c51b303b"
 
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..148694a13f
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/files/CVE-2026-4892.patch
@@ -0,0 +1,41 @@
+From 2f029069825270a3b91eb5f50bb8477ed7f761d3 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <[email protected]>
+Date: Wed, 25 Mar 2026 23:16:35 +0000
+Subject: [PATCH] Fix buffer overflow in helper.c with large CLIDs.
+ CVE-2026-4892
+
+Bug reported bt Royce M <[email protected]>
+
+Location: helper.c:265-270
+DHCPv6 CLIDs can be up to 65535 bytes. When --dhcp-script is configured,
+the helper hex-encodes raw CLID bytes via sprintf("%.2x") into daemon->packet 
(5131 bytes).
+A 1000-byte CLID writes ~3000 bytes. The helper process retains root 
privileges.
+
+Note: log6_packet() correctly caps CLID to 100 bytes for logging, but the 
helper code path was missed.
+
+CVE: CVE-2026-4892
+Upstream-Status: Backport 
[https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=10e6b5b83e80749cba7b090d7780b29f908f0571]
+
+Signed-off-by: Hugo SIMELIERE (Schneider Electric) 
<[email protected]>
+---
+ src/helper.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/helper.c b/src/helper.c
+index b9da2259..3a31e618 100644
+--- a/src/helper.c
++++ b/src/helper.c
+@@ -261,8 +261,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, 
gid_t gid, long max_fd)
+                     data.hostname_len + data.ed_len + data.clid_len, 1))
+       continue;
+ 
+-      /* CLID into packet */
+-      for (p = daemon->packet, i = 0; i < data.clid_len; i++)
++      /* CLID into packet: limit to 100 bytes to avoid overflowing buffer. */
++      for (p = daemon->packet, i = 0; i < data.clid_len && i < 100; i++)
+       {
+         p += sprintf(p, "%.2x", buf[i]);
+         if (i != data.clid_len - 1) 
+-- 
+2.43.0
+
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127113): 
https://lists.openembedded.org/g/openembedded-devel/message/127113
Mute This Topic: https://lists.openembedded.org/mt/119406785/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to