Skip to contentSkip to conversation

busybox: patch CVE-2024-58251

PATCH In review [email protected] 2 participants 5 messages May 19 – May 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 busybox: patch CVE-2024-58251

From: Peter Marko <[email protected]>

Pick patch applied by Debian [1].

I did not find any reference on busybox mailing list that this patch was submitted. Submitting patch for someone else would be inappropriate, and busybox is currently known to be very inactive, hence the unwanted Pending Upstream-Status status.
Also note that the related busybox bugreport [2] is currently not public, so it is possible that it was submitted there.

[1] https://sources.debian.org/patches/busybox/1:1.37.0-10.1/netstat-sanitize-argv0-for-p-CVE-2024-58251.patch/
[2] https://bugs.busybox.net/show_bug.cgi?id=15922

---
 .../busybox/busybox/CVE-2024-58251.patch      | 51 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.37.0.bb   |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2024-58251.patch
meta/recipes-core/busybox/busybox/CVE-2024-58251.patch new file +51 -0
new file mode 100644
index 0000000000..713d345ca8
@@ -0,0 +1,51 @@
+From: Valery Ushakov <[email protected]>
+Date: Thu, 21 Aug 2025 12:31:53 +0000
+Subject: netstat: CVE-2024-58251 - sanitize argv0 for -p
+Bug-Debian: https://bugs.debian.org/1104009
+
+Signed-off-by: Valery Ushakov <[email protected]>
+
+CVE: CVE-2024-58251
+Upstream-Status: Pending
+Signed-off-by: Peter Marko <[email protected]>
+---
+ networking/netstat.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/networking/netstat.c b/networking/netstat.c
+index 807800a62..d979f6079 100644
+--- a/networking/netstat.c
++++ b/networking/netstat.c
+@@ -41,6 +41,7 @@
+ 
+ #include "libbb.h"
+ #include "inet_common.h"
++#include "unicode.h"
+ 
+ //usage:#define netstat_trivial_usage
+ //usage:       "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
+@@ -314,9 +315,12 @@ static int FAST_FUNC dir_act(struct recursive_state *state,
+ 		return FALSE;
+ 	cmdline_buf[n] = '\0';
+ 
++	/* don't write process-controlled argv[0] to the user's terminal as-is */
++	const char *argv0base = printable_string(bb_basename(cmdline_buf));
++
+ 	/* go through all files in /proc/PID/fd and check whether they are sockets */
+ 	strcpy(proc_pid_fname + len - (sizeof("cmdline")-1), "fd");
+-	pid_slash_progname = concat_path_file(pid, bb_basename(cmdline_buf)); /* "PID/argv0" */
++	pid_slash_progname = concat_path_file(pid, argv0base); /* "PID/argv0" */
+ 	n = recursive_action(proc_pid_fname,
+ 			ACTION_RECURSE | ACTION_QUIET,
+ 			add_to_prg_cache_if_socket,
+@@ -686,6 +690,7 @@ int netstat_main(int argc UNUSED_PARAM, char **argv)
+ 	unsigned opt;
+ 
+ 	INIT_G();
++	init_unicode();
+ 
+ 	/* Option string must match NETSTAT_xxx constants */
+ 	opt = getopt32(argv, NETSTAT_OPTS);
+-- 
+2.34.1
+
meta/recipes-core/busybox/busybox_1.37.0.bb +1 -0
index 61ff602be6..4790899684 100644
@@ -63,6 +63,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch \
            file://0001-tar-strip-unsafe-hardlink-components-GNU-tar-does-th.patch \
            file://0002-tar-only-strip-unsafe-components-from-hardlinks-not-.patch \
+           file://CVE-2024-58251.patch \
            "
 SRC_URI:append:libc-musl = " file://musl.cfg"
 SRC_URI:append:x86-64 = " file://sha_accel.cfg"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 busybox: fix CVE-2026-29004

From: Chen Qi <[email protected]>

Backport two patches to fix CVE-2026-29004.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2026-29004

---
 .../busybox/busybox/CVE-2026-29004-01.patch   | 42 +++++++++++++++++
 .../busybox/busybox/CVE-2026-29004-02.patch   | 47 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.37.0.bb   |  2 +
 3 files changed, 91 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch
meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch new file +42 -0
new file mode 100644
index 0000000000..8ce4858adc
@@ -0,0 +1,42 @@
+From d9a718cc17535c31d38f31fccb904a30e823166d Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 07:25:38 +0100
+Subject: [PATCH 1/2] udhcpc6: fix buffer overflow
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/42202bfb1e6ac51fa995beda8be4d7b654aeee2a]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index 79cef1999..d13b05829 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -351,15 +351,15 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+ 			addrs = option[3] >> 4;
+ 
+ 			/* Setup environment variable */
+-			*new_env() = dlist = xmalloc(4 + addrs * 40 - 1);
++			*new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
+ 			dlist = stpcpy(dlist, "dns=");
+ 			option_offset = 0;
+ 
+-			while (addrs--) {
++			while (addrs-- != 0) {
+ 				sprint_nip6(dlist, option + 4 + option_offset);
+ 				dlist += 39;
+ 				option_offset += 16;
+-				if (addrs)
++				if (addrs != 0)
+ 					*dlist++ = ' ';
+ 			}
+ 
+-- 
+2.34.1
+
meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-core/busybox/busybox_1.37.0.bb +2 -0
index 4790899684..a6abfa2598 100644
@@ -64,6 +64,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://0001-tar-strip-unsafe-hardlink-components-GNU-tar-does-th.patch \
            file://0002-tar-only-strip-unsafe-components-from-hardlinks-not-.patch \
            file://CVE-2024-58251.patch \
+           file://CVE-2026-29004-01.patch \
+           file://CVE-2026-29004-02.patch \
            "
 SRC_URI:append:libc-musl = " file://musl.cfg"
 SRC_URI:append:x86-64 = " file://sha_accel.cfg"
Signature · 1 line
2.34.1
#2 lore raw

Re: [OE-core][wrynose][PATCH 2/2] busybox: fix CVE-2026-29004

Quoted 9 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

Backport two patches to fix CVE-2026-29004.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2026-29004

---

Hello,

As far as I can tell, this CVE-2026-29004 also applies to master (in particular, it does not looked fixed in the recent 1.38.0 upgrade).

I can't merge this on wrynose until a fix is merged on master. Can you send the equivalent fix to master?

Thanks!

Quoted 121 lines
 .../busybox/busybox/CVE-2026-29004-01.patch   | 42 +++++++++++++++++
 .../busybox/busybox/CVE-2026-29004-02.patch   | 47 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.37.0.bb   |  2 +
 3 files changed, 91 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch
meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch new file +42 -0
new file mode 100644
index 0000000000..8ce4858adc
@@ -0,0 +1,42 @@
+From d9a718cc17535c31d38f31fccb904a30e823166d Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 07:25:38 +0100
+Subject: [PATCH 1/2] udhcpc6: fix buffer overflow
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/42202bfb1e6ac51fa995beda8be4d7b654aeee2a]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index 79cef1999..d13b05829 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -351,15 +351,15 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+ 			addrs = option[3] >> 4;
+ 
+ 			/* Setup environment variable */
+-			*new_env() = dlist = xmalloc(4 + addrs * 40 - 1);
++			*new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
+ 			dlist = stpcpy(dlist, "dns=");
+ 			option_offset = 0;
+ 
+-			while (addrs--) {
++			while (addrs-- != 0) {
+ 				sprint_nip6(dlist, option + 4 + option_offset);
+ 				dlist += 39;
+ 				option_offset += 16;
+-				if (addrs)
++				if (addrs != 0)
+ 					*dlist++ = ' ';
+ 			}
+ 
+-- 
+2.34.1
+
meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch new file +47 -0
new file mode 100644
index 0000000000..734f0bbbdb
@@ -0,0 +1,47 @@
+From 1e14c5c577a7bd46f42315e9bc445419770041a7 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 13:23:48 +0100
+Subject: [PATCH 2/2] udhcpc6: check the size of D6_OPT_IAPREFIX option
+
+function                                             old     new   delta
+option_to_env                                        694     711     +17
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/d368f3f7836d1c2484c8f839316e5c93e76d4409]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index d13b05829..1851cee2a 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -287,8 +287,8 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |                        valid-lifetime                         |
+  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  */
+-			/* Make sure payload contains an address */
+-			if (option[3] < 24)
++			/* Make sure payload exists */
++			if (option[3] < (16 + 4 + 4))
+ 				break;
+ 
+ 			sprint_nip6(ipv6str, option + 4);
+@@ -332,6 +332,9 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |               |
+  * +-+-+-+-+-+-+-+-+
+  */
++			/* Make sure payload exists */
++			if (option[3] < (4 + 4 + 1 + 16))
++				break;
+ 			move_from_unaligned32(v32, option + 4 + 4);
+ 			v32 = ntohl(v32);
+ 			*new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
+-- 
+2.34.1
+
meta/recipes-core/busybox/busybox_1.37.0.bb +2 -0
index 4790899684..a6abfa2598 100644
@@ -64,6 +64,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://0001-tar-strip-unsafe-hardlink-components-GNU-tar-does-th.patch \
            file://0002-tar-only-strip-unsafe-components-from-hardlinks-not-.patch \
            file://CVE-2024-58251.patch \
+           file://CVE-2026-29004-01.patch \
+           file://CVE-2026-29004-02.patch \
            "
 SRC_URI:append:libc-musl = " file://musl.cfg"
 SRC_URI:append:x86-64 = " file://sha_accel.cfg"
Signature · 2 lines
Yoann Congal
Smile ECS
author
#3 lore raw

Re: [OE-core][wrynose][PATCH 2/2] busybox: fix CVE-2026-29004

Quoted 10 lines · Yoann Congal via lists.openembedded.org
Quoted 9 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

Backport two patches to fix CVE-2026-29004.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2026-29004

---

Quoted 7 lines

Hello,

As far as I can tell, this CVE-2026-29004 also applies to master (in particular, it does not looked fixed in the recent 1.38.0 upgrade).

I can't merge this on wrynose until a fix is merged on master. Can you send the equivalent fix to master?

I checked this before I sent out patches. I can confirm that the issue has been fixed in 1.38.0.

"""

$ grep -A 5 "Setup environment variable" busybox-1.38.0/networking/udhcp/d6_dhcpc.c
                        /* Setup environment variable */
                        *new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
                        dlist = stpcpy(dlist, "dns=");
                        option_offset = 0;

                        while (addrs-- != 0) {
"""

And Andrej has already sent the 1.38.0 update for master branch.

Regards,
Qi

Quoted 134 lines

Thanks!

Quoted 113 lines
  .../busybox/busybox/CVE-2026-29004-01.patch   | 42 +++++++++++++++++
  .../busybox/busybox/CVE-2026-29004-02.patch   | 47 +++++++++++++++++++
  meta/recipes-core/busybox/busybox_1.37.0.bb   |  2 +
  3 files changed, 91 insertions(+)

create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch

meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch new file +42 -0
new file mode 100644
index 0000000000..8ce4858adc
@@ -0,0 +1,42 @@
+From d9a718cc17535c31d38f31fccb904a30e823166d Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 07:25:38 +0100
+Subject: [PATCH 1/2] udhcpc6: fix buffer overflow
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/42202bfb1e6ac51fa995beda8be4d7b654aeee2a]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index 79cef1999..d13b05829 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -351,15 +351,15 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+ 			addrs = option[3] >> 4;
+
+ 			/* Setup environment variable */
+-			*new_env() = dlist = xmalloc(4 + addrs * 40 - 1);
++			*new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
+ 			dlist = stpcpy(dlist, "dns=");
+ 			option_offset = 0;
+
+-			while (addrs--) {
++			while (addrs-- != 0) {
+ 				sprint_nip6(dlist, option + 4 + option_offset);
+ 				dlist += 39;
+ 				option_offset += 16;
+-				if (addrs)
++				if (addrs != 0)
+ 					*dlist++ = ' ';
+ 			}
+
+--
+2.34.1
+
meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch new file +47 -0
new file mode 100644
index 0000000000..734f0bbbdb
@@ -0,0 +1,47 @@
+From 1e14c5c577a7bd46f42315e9bc445419770041a7 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 13:23:48 +0100
+Subject: [PATCH 2/2] udhcpc6: check the size of D6_OPT_IAPREFIX option
+
+function                                             old     new   delta
+option_to_env                                        694     711     +17
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/d368f3f7836d1c2484c8f839316e5c93e76d4409]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index d13b05829..1851cee2a 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -287,8 +287,8 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |                        valid-lifetime                         |
+  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  */
+-			/* Make sure payload contains an address */
+-			if (option[3] < 24)
++			/* Make sure payload exists */
++			if (option[3] < (16 + 4 + 4))
+ 				break;
+
+ 			sprint_nip6(ipv6str, option + 4);
+@@ -332,6 +332,9 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |               |
+  * +-+-+-+-+-+-+-+-+
+  */
++			/* Make sure payload exists */
++			if (option[3] < (4 + 4 + 1 + 16))
++				break;
+ 			move_from_unaligned32(v32, option + 4 + 4);
+ 			v32 = ntohl(v32);
+ 			*new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
+--
+2.34.1
+
meta/recipes-core/busybox/busybox_1.37.0.bb +0 -0
index 4790899684..a6abfa2598 100644

meta/recipes-core/busybox/busybox_1.37.0.bb SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ · line 71

Quoted 8 lines
meta/recipes-core/busybox/busybox_1.37.0.bb +2 -0
@@ -64,6 +64,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
             file://0001-tar-strip-unsafe-hardlink-components-GNU-tar-does-th.patch \
             file://0002-tar-only-strip-unsafe-components-from-hardlinks-not-.patch \
             file://CVE-2024-58251.patch \
+           file://CVE-2026-29004-01.patch \
+           file://CVE-2026-29004-02.patch \
             "
  SRC_URI:append:libc-musl = " file://musl.cfg"
  SRC_URI:append:x86-64 = " file://sha_accel.cfg"

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

#4 lore raw

Re: [OE-core][wrynose][PATCH 2/2] busybox: fix CVE-2026-29004

Quoted 30 lines · ChenQi
Quoted 10 lines · Yoann Congal via lists.openembedded.org
Quoted 9 lines · Chen Qi via lists.openembedded.org

From: Chen Qi <[email protected]>

Backport two patches to fix CVE-2026-29004.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2026-29004

---

Quoted 7 lines

Hello,

As far as I can tell, this CVE-2026-29004 also applies to master (in particular, it does not looked fixed in the recent 1.38.0 upgrade).

I can't merge this on wrynose until a fix is merged on master. Can you send the equivalent fix to master?

I checked this before I sent out patches. I can confirm that the issue has been fixed in 1.38.0.

"""

$ grep -A 5 "Setup environment variable" 
busybox-1.38.0/networking/udhcp/d6_dhcpc.c
                         /* Setup environment variable */
                         *new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
                         dlist = stpcpy(dlist, "dns=");
                         option_offset = 0;
Quoted 4 lines

                        while (addrs-- != 0) {
"""

And Andrej has already sent the 1.38.0 update for master branch.

Ah right. The github mirror is missing the 1.38.0 tag. But the commit is listed in the changelog. So I'll add this patch to my series.

Thanks!

Quoted 138 lines

Regards,
Qi

Quoted 134 lines

Thanks!

Quoted 113 lines
  .../busybox/busybox/CVE-2026-29004-01.patch   | 42 +++++++++++++++++
  .../busybox/busybox/CVE-2026-29004-02.patch   | 47 +++++++++++++++++++
  meta/recipes-core/busybox/busybox_1.37.0.bb   |  2 +
  3 files changed, 91 insertions(+)

create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch

meta/recipes-core/busybox/busybox/CVE-2026-29004-01.patch new file +42 -0
new file mode 100644
index 0000000000..8ce4858adc
@@ -0,0 +1,42 @@
+From d9a718cc17535c31d38f31fccb904a30e823166d Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 07:25:38 +0100
+Subject: [PATCH 1/2] udhcpc6: fix buffer overflow
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/42202bfb1e6ac51fa995beda8be4d7b654aeee2a]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index 79cef1999..d13b05829 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -351,15 +351,15 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+ 			addrs = option[3] >> 4;
+
+ 			/* Setup environment variable */
+-			*new_env() = dlist = xmalloc(4 + addrs * 40 - 1);
++			*new_env() = dlist = xmalloc(4 + addrs * 40 + 1);
+ 			dlist = stpcpy(dlist, "dns=");
+ 			option_offset = 0;
+
+-			while (addrs--) {
++			while (addrs-- != 0) {
+ 				sprint_nip6(dlist, option + 4 + option_offset);
+ 				dlist += 39;
+ 				option_offset += 16;
+-				if (addrs)
++				if (addrs != 0)
+ 					*dlist++ = ' ';
+ 			}
+
+--
+2.34.1
+
meta/recipes-core/busybox/busybox/CVE-2026-29004-02.patch new file +47 -0
new file mode 100644
index 0000000000..734f0bbbdb
@@ -0,0 +1,47 @@
+From 1e14c5c577a7bd46f42315e9bc445419770041a7 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+Date: Thu, 12 Mar 2026 13:23:48 +0100
+Subject: [PATCH 2/2] udhcpc6: check the size of D6_OPT_IAPREFIX option
+
+function                                             old     new   delta
+option_to_env                                        694     711     +17
+
+Signed-off-by: Denys Vlasenko <[email protected]>
+
+CVE: CVE-2026-29004
+
+Upstream-Status: Backport [https://github.com/vda-linux/busybox_mirror/commit/d368f3f7836d1c2484c8f839316e5c93e76d4409]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ networking/udhcp/d6_dhcpc.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index d13b05829..1851cee2a 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -287,8 +287,8 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |                        valid-lifetime                         |
+  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  */
+-			/* Make sure payload contains an address */
+-			if (option[3] < 24)
++			/* Make sure payload exists */
++			if (option[3] < (16 + 4 + 4))
+ 				break;
+
+ 			sprint_nip6(ipv6str, option + 4);
+@@ -332,6 +332,9 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
+  * |               |
+  * +-+-+-+-+-+-+-+-+
+  */
++			/* Make sure payload exists */
++			if (option[3] < (4 + 4 + 1 + 16))
++				break;
+ 			move_from_unaligned32(v32, option + 4 + 4);
+ 			v32 = ntohl(v32);
+ 			*new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
+--
+2.34.1
+
meta/recipes-core/busybox/busybox_1.37.0.bb +0 -0
index 4790899684..a6abfa2598 100644

meta/recipes-core/busybox/busybox_1.37.0.bb SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ · line 71

Quoted 8 lines
meta/recipes-core/busybox/busybox_1.37.0.bb +2 -0
@@ -64,6 +64,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
             file://0001-tar-strip-unsafe-hardlink-components-GNU-tar-does-th.patch \
             file://0002-tar-only-strip-unsafe-components-from-hardlinks-not-.patch \
             file://CVE-2024-58251.patch \
+           file://CVE-2026-29004-01.patch \
+           file://CVE-2026-29004-02.patch \
             "
  SRC_URI:append:libc-musl = " file://musl.cfg"
  SRC_URI:append:x86-64 = " file://sha_accel.cfg"

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

Signature · 2 lines
Yoann Congal
Smile ECS