new file mode 100644
@@ -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
+
@@ -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"