From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" <dkelaiya@cisco.com>
To: openembedded-core@lists.openembedded.org
Cc: Darsh Kelaiya <dkelaiya@cisco.com>
Subject: [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753
Date: Wed, 4 Nov 2026 23:34:51 -0800 [thread overview]
Message-ID: <20261105073452.890881-2-dkelaiya@cisco.com> (raw)
In-Reply-To: <20261105073452.890881-1-dkelaiya@cisco.com>
From: Darsh Kelaiya <dkelaiya@cisco.com>
This patch applies the upstream fix shown in [1].
The advisory identifying the fix is referenced in [2].
[1] https://lists.busybox.net/pipermail/busybox/2026-June/092352.html
[2] https://nvd.nist.gov/vuln/detail/cve-2026-38753
Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
---
.../busybox/busybox/CVE-2026-38753.patch | 55 +++++++++++++++++++
meta/recipes-core/busybox/busybox_1.38.0.bb | 1 +
2 files changed, 56 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-38753.patch
diff --git a/meta/recipes-core/busybox/busybox/CVE-2026-38753.patch b/meta/recipes-core/busybox/busybox/CVE-2026-38753.patch
new file mode 100644
index 0000000..5e4cb94
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2026-38753.patch
@@ -0,0 +1,55 @@
+From 2365a1c6ef6054df297f90887f9ed305041c3675 Mon Sep 17 00:00:00 2001
+From: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Date: Tue, 16 Jun 2026 12:18:43 +0900
+Subject: [PATCH] awk: fix use-after-free in awk_sub()
+
+awk_sub() receives the replacement text as a pointer into awk variable
+storage. Evaluating the regular expression argument can change that
+storage through as_regex(), leaving the replacement pointer dangling
+before strlen() and the replacement loop use it.
+
+Copy the replacement string before calling as_regex() so substitution
+uses stable storage for the duration of the operation.
+
+CVE: CVE-2026-38753
+Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2026-June/092352.html]
+
+Signed-off-by: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ editors/awk.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/editors/awk.c b/editors/awk.c
+index f15832b..8a51827 100644
+--- a/editors/awk.c
++++ b/editors/awk.c
+@@ -2555,6 +2555,7 @@ static char *awk_printf(node *n, size_t *len)
+ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest /*,int subexp*/)
+ {
+ char *resbuf;
++ char *repl_copy;
+ const char *sp;
+ int match_no, residx, replen, resbufsize;
+ int regexec_flags;
+@@ -2572,7 +2573,9 @@ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest /*,in
+ resbuf = NULL;
+ residx = 0;
+ match_no = 0;
++ repl_copy = xstrdup(repl);
+ regex = as_regex(rn, &sreg);
++ repl = repl_copy;
+ sp = getvar_s(src ? src : intvar[F0]);
+ #if defined(REG_STARTEND)
+ src_string = sp;
+@@ -2662,6 +2665,7 @@ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest /*,in
+ setvar_p(dest ? dest : intvar[F0], resbuf);
+ if (regex == &sreg)
+ regfree(regex);
++ free(repl_copy);
+ return match_no;
+ }
+
+--
+2.35.6
+
diff --git a/meta/recipes-core/busybox/busybox_1.38.0.bb b/meta/recipes-core/busybox/busybox_1.38.0.bb
index bf78951..108839e 100644
--- a/meta/recipes-core/busybox/busybox_1.38.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.38.0.bb
@@ -60,6 +60,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2025-60876.patch \
file://CVE-2024-58251.patch \
file://CVE-2026-38752.patch \
+ file://CVE-2026-38753.patch \
file://CVE-2026-38754.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg"
--
2.35.6
next prev parent reply other threads:[~2026-11-05 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 7:34 [OE-core][master][PATCH 1/3] busybox: fix CVE-2026-38752 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-05 7:34 ` Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) [this message]
2026-11-05 7:34 ` [OE-core][master][PATCH 3/3] busybox: fix CVE-2026-38755 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-17 10:00 ` [OE-core][master][PATCH 1/3] busybox: fix CVE-2026-38752 Paul Barker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105073452.890881-2-dkelaiya@cisco.com \
--to=dkelaiya@cisco.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox