* [OE-core][master][PATCH 1/3] busybox: fix CVE-2026-38752
@ 2026-11-05 7:34 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-05 7:34 ` [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-05 7:34 UTC (permalink / raw)
To: openembedded-core; +Cc: Darsh Kelaiya
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/092351.html
[2] https://nvd.nist.gov/vuln/detail/cve-2026-38752
Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
---
.../busybox/busybox/CVE-2026-38752.patch | 84 +++++++++++++++++++
meta/recipes-core/busybox/busybox_1.38.0.bb | 1 +
2 files changed, 85 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-38752.patch
diff --git a/meta/recipes-core/busybox/busybox/CVE-2026-38752.patch b/meta/recipes-core/busybox/busybox/CVE-2026-38752.patch
new file mode 100644
index 0000000..1906229
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2026-38752.patch
@@ -0,0 +1,84 @@
+From a8374915ceb752f08385de1eaf1d8782246047ae Mon Sep 17 00:00:00 2001
+From: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Date: Tue, 16 Jun 2026 12:16:05 +0900
+Subject: [PATCH] awk: fix stack overflow in evaluate()
+
+Recursive awk functions can keep re-entering evaluate() until the
+process stack is exhausted. Track active function-call depth and report a
+normal awk error once the limit is reached instead of overflowing the
+stack.
+
+CVE: CVE-2026-38752
+Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2026-June/092351.html]
+
+Signed-off-by: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ editors/awk.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/editors/awk.c b/editors/awk.c
+index dd8f4ac..f15832b 100644
+--- a/editors/awk.c
++++ b/editors/awk.c
+@@ -633,6 +633,7 @@ struct globals {
+ smalluint exitcode;
+
+ unsigned evaluate__seed;
++ unsigned evaluate__func_depth;
+ var *evaluate__fnargs;
+ regex_t evaluate__sreg;
+
+@@ -703,6 +704,7 @@ static const char EMSG_UNEXP_TOKEN[] ALIGN1 = "Unexpected token";
+ static const char EMSG_DIV_BY_ZERO[] ALIGN1 = "Division by zero";
+ static const char EMSG_INV_FMT[] ALIGN1 = "Invalid format specifier";
+ static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments";
++static const char EMSG_RECURSION[] ALIGN1 = "Recursion limit exceeded";
+ static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array";
+ static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error";
+ static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function";
+@@ -2988,6 +2990,7 @@ static var *evaluate(node *op, var *res)
+ #define fnargs (G.evaluate__fnargs)
+ /* seed is initialized to 1 */
+ #define seed (G.evaluate__seed)
++#define func_depth (G.evaluate__func_depth)
+ #define sreg (G.evaluate__sreg)
+
+ var *tmpvars;
+@@ -3299,13 +3302,17 @@ static var *evaluate(node *op, var *res)
+ var *argvars, *sv_fnargs;
+ const char *sv_progname;
+ int nargs, i;
++ enum { MAX_AWK_FUNC_DEPTH = 1000 };
+
+ debug_printf_eval("FUNC\n");
+
+ if (!op->r.f->defined)
+ syntax_error(EMSG_UNDEF_FUNC);
++ if (func_depth >= MAX_AWK_FUNC_DEPTH)
++ syntax_error(EMSG_RECURSION);
+
+ /* The body might be empty, still has to eval the args */
++ func_depth++;
+ nargs = op->r.f->nargs;
+ argvars = nvalloc(nargs);
+ i = 0;
+@@ -3333,6 +3340,7 @@ static var *evaluate(node *op, var *res)
+
+ g_progname = sv_progname;
+ fnargs = sv_fnargs;
++ func_depth--;
+
+ break;
+ }
+@@ -3690,6 +3698,7 @@ static var *evaluate(node *op, var *res)
+ return res;
+ #undef fnargs
+ #undef seed
++#undef func_depth
+ #undef sreg
+ }
+
+--
+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 a75c639..bf78951 100644
--- a/meta/recipes-core/busybox/busybox_1.38.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.38.0.bb
@@ -59,6 +59,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://CVE-2025-60876.patch \
file://CVE-2024-58251.patch \
+ file://CVE-2026-38752.patch \
file://CVE-2026-38754.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg"
--
2.35.6
^ permalink raw reply related [flat|nested] 4+ messages in thread* [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753
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)
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
2 siblings, 0 replies; 4+ messages in thread
From: Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-05 7:34 UTC (permalink / raw)
To: openembedded-core; +Cc: Darsh Kelaiya
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [OE-core][master][PATCH 3/3] busybox: fix CVE-2026-38755
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 ` [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753 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)
2026-11-17 10:00 ` [OE-core][master][PATCH 1/3] busybox: fix CVE-2026-38752 Paul Barker
2 siblings, 0 replies; 4+ messages in thread
From: Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-05 7:34 UTC (permalink / raw)
To: openembedded-core; +Cc: Darsh Kelaiya
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/092354.html
[2] https://nvd.nist.gov/vuln/detail/cve-2026-38755
Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
---
.../busybox/busybox/CVE-2026-38755.patch | 71 +++++++++++++++++++
meta/recipes-core/busybox/busybox_1.38.0.bb | 1 +
2 files changed, 72 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/CVE-2026-38755.patch
diff --git a/meta/recipes-core/busybox/busybox/CVE-2026-38755.patch b/meta/recipes-core/busybox/busybox/CVE-2026-38755.patch
new file mode 100644
index 0000000..d999a0c
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2026-38755.patch
@@ -0,0 +1,71 @@
+From 819a0f9ba510c4d9efce0021a0357faa6257b44d Mon Sep 17 00:00:00 2001
+From: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Date: Tue, 16 Jun 2026 12:19:27 +0900
+Subject: [PATCH] ash: fix stack overflow in evalfun()
+
+Recursive shell functions can repeatedly enter evalfun() until the
+process stack is exhausted. Track active shell function calls and raise a
+normal shell error when the recursion limit is reached.
+
+The counter is decremented through the existing funcdone cleanup path so
+errors raised from inside the function body unwind it correctly.
+
+CVE: CVE-2026-38755
+Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2026-June/092354.html]
+
+Signed-off-by: Sanghyun Park <sanghyun.park.cnu@gmail.com>
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ shell/ash.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/shell/ash.c b/shell/ash.c
+index b8ff67b..4c7c778 100644
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -481,6 +481,7 @@ struct globals_misc {
+ int shlvl;
+ #define rootshell (!shlvl)
+ int errlinno;
++ unsigned func_depth;
+
+ char *minusc; /* argument to -c option */
+
+@@ -588,6 +589,7 @@ extern struct globals_misc *BB_GLOBAL_CONST ash_ptr_to_globals_misc;
+ #define rootpid (G_misc.rootpid )
+ #define shlvl (G_misc.shlvl )
+ #define errlinno (G_misc.errlinno )
++#define func_depth (G_misc.func_depth )
+ #define minusc (G_misc.minusc )
+ #define curdir (G_misc.curdir )
+ #define physdir (G_misc.physdir )
+@@ -10309,6 +10311,10 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
+ int savefuncline;
+ char *savefuncname;
+ char *savetrap = NULL;
++ enum { MAX_ASH_FUNC_DEPTH = 1000 };
++
++ if (func_depth >= MAX_ASH_FUNC_DEPTH)
++ ash_msg_and_raise_error("function recursion limit exceeded");
+
+ if (!Eflag) {
+ savetrap = trap[NTRAP_ERR];
+@@ -10327,6 +10333,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
+ exception_handler = &jmploc;
+ shellparam.malloced = 0;
+ func->count++;
++ func_depth++;
+ funcname = func->n.ndefun.text;
+ funcline = func->n.ndefun.linno;
+ INTON;
+@@ -10348,6 +10355,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
+ }
+ funcline = savefuncline;
+ lineno = savelineno;
++ func_depth--;
+ freefunc(func);
+ freeparam(&shellparam);
+ shellparam = saveparam;
+--
+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 108839e..2c0b415 100644
--- a/meta/recipes-core/busybox/busybox_1.38.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.38.0.bb
@@ -62,6 +62,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2026-38752.patch \
file://CVE-2026-38753.patch \
file://CVE-2026-38754.patch \
+ file://CVE-2026-38755.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg"
SRC_URI:append:x86-64 = " file://sha_accel.cfg"
--
2.35.6
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [OE-core][master][PATCH 1/3] busybox: fix CVE-2026-38752
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 ` [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
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 ` Paul Barker
2 siblings, 0 replies; 4+ messages in thread
From: Paul Barker @ 2026-11-17 10:00 UTC (permalink / raw)
To: Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco),
openembedded-core
On Thu Nov 5, 2026 at 7:34 AM GMT, Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) wrote:
> 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/092351.html
> [2] https://nvd.nist.gov/vuln/detail/cve-2026-38752
>
> Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
Hi Darsh,
The patches here have been submitted to busybox but have not received
any upstream review. Can you point to any evidence that these are good,
e.g. other distros taking these patches?
TBH I wonder how this is even a CVE issue. As busybox isn't a CNA, and
their patch review process is known to be slow, it's very easy for
someone to just file nonsense CVE reports.
A stack overflow in the evaluate() function (editors/awk.c) of
BusyBox commit 371fe9 allows attackers to cause a Denial of Service
(DoS) via supplying a crafted AWK script.
If you can supply your own AWK script, you could just run:
BEGIN { while (1) print "looping..." }
Or some other misbehaviour. Bug, yes. Security bug? I don't see how.
Please step back and do some analysis, I don't think trying to play
whack-a-mole on every CVE report is sustainable.
Best regards,
--
Paul Barker
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-17 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [OE-core][master][PATCH 2/3] busybox: fix CVE-2026-38753 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox