From patchwork Tue Dec 1 15:56:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= X-Patchwork-Id: 106834 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14375.1796141344980114564 for ; Tue, 01 Dec 2026 08:09:05 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=ROwMaAYd; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 516521A18AF; Tue, 1 Dec 2026 16:09:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1EC08603CB; Tue, 1 Dec 2026 16:09:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BB03311EA2694; Tue, 01 Dec 2026 17:08:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796141338; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=/2sIG8duTeXfBHx3OWsgXra6bTzF6qiT1WJ9S4i14wI=; b=ROwMaAYdMy+saepTbKHF5CEovSdxmKDO4v3cl4KkTKkfOwksgYyPLIScmuJ/VaSwV4CxJM SKJkryyMDbFylEIv8YC53PlrSqoSVabBUy3aRoyEa8r9ClJ0yU8MVale+vHpT9RG3nMogU NjLi7x0fvZxx+G9lYs0R9wi4jMmtMuScLQ2USFLc/08YdjTdfB5T7qNKMmBamFZycL7te0 oAF4T9l9Mw89Gy7cpftbQszNbTLwfjXtR1VO9V6raAckJVfRdVXohKa9E4R2uPrnrJxVij UY9HaHl0j3OZq0HQThYgRN2OE2YwPXItTNUXeyApRi0cMDNPAY8p7qZu3eyv+w== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, yoann.congal@smile.fr, =?utf-8?q?Jo=C3=A3o?= =?utf-8?q?_Marcos_Costa_=28Schneider_Electric=29?= Subject: [scarthgap][PATCH 2/3] busybox: fix CVE-2026-38753 Date: Tue, 1 Dec 2026 16:56:55 +0100 Message-ID: <20261201155656.839273-3-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201155656.839273-1-joaomarcos.costa@bootlin.com> References: <20261201155656.839273-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 16:09:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251751 A patch [1] to fix this vulnerability, marked as High [2], was submitted to Busybox's mailing list, but not yet merged. Backport the fix to busybox 1.36.1, and mark it as 'Pending'. [1] https://lists.busybox.net/pipermail/busybox/2026-June/092352.html [2] https://nvd.nist.gov/vuln/detail/cve-2026-38753 Signed-off-by: João Marcos Costa (Schneider Electric) --- .../busybox/busybox/CVE-2026-38753.patch | 57 +++++++++++++++++++ meta/recipes-core/busybox/busybox_1.36.1.bb | 1 + 2 files changed, 58 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 0000000000..2a4d25cbed --- /dev/null +++ b/meta/recipes-core/busybox/busybox/CVE-2026-38753.patch @@ -0,0 +1,57 @@ +From bab483171876d2e46630519df7d6bec4327f073d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +Date: Tue, 1 Dec 2026 16:12:42 +0100 +Subject: [PATCH] awk: fix use-after-free in awk_sub() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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. + +Signed-off-by: Sanghyun Park + +CVE: CVE-2026-38753 +Upstream-Status: Pending [https://lists.busybox.net/pipermail/busybox/2026-June/092352.html] + +Signed-off-by: João Marcos Costa (Schneider Electric) +--- + editors/awk.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/editors/awk.c b/editors/awk.c +index 137e9d194..1b60c9288 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -2498,6 +2498,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; +@@ -2507,8 +2508,10 @@ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest, int + resbuf = NULL; + residx = 0; + match_no = 0; ++ repl_copy = xstrdup(repl); + regexec_flags = 0; + regex = as_regex(rn, &sreg); ++ repl = repl_copy; + sp = getvar_s(src ? src : intvar[F0]); + replen = strlen(repl); + while (regexec(regex, sp, 10, pmatch, regexec_flags) == 0) { +@@ -2583,6 +2586,7 @@ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest, int + setvar_p(dest ? dest : intvar[F0], resbuf); + if (regex == &sreg) + regfree(regex); ++ free(repl_copy); + return match_no; + } + diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 629fe758f6..68dea62557 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb @@ -69,6 +69,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://CVE-2026-38754.patch \ file://CVE-2024-58251.patch \ file://CVE-2026-38752.patch \ + file://CVE-2026-38753.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg " # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html