bash: backport patch to fix CVE-2022-3715

CVE Reference: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2022-3715

(From OE-Core rev: 69a52a564f45dafeb65a93a45d3db9c1d178526a)

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Xiangyu Chen
2022-11-23 11:44:04 +08:00
committed by Richard Purdie
parent c505f3539d
commit 97a5932101
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
From 15d2428d5d3df8dd826008baf51579ab7750d8b2 Mon Sep 17 00:00:00 2001
From: Xiangyu Chen <xiangyu.chen@windriver.com>
Date: Wed, 23 Nov 2022 11:17:01 +0800
Subject: [OE-Core][kirkstone][PATCH] bash: heap-buffer-overflow in
valid_parameter_transform CVE-2022-3715
Reference:https://bugzilla.redhat.com/show_bug.cgi?id=2126720
CVE: CVE-2022-3715
Upstream-Status: Backport from
[https://git.savannah.gnu.org/cgit/bash.git/diff/subst.c?h=bash-5.2-testing&id=9cef6d01181525de119832d2b6a925899cdec08e]
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
subst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subst.c b/subst.c
index 2b76256..38ee9ac 100644
--- a/subst.c
+++ b/subst.c
@@ -7962,7 +7962,7 @@ parameter_brace_transform (varname, value, ind, xform, rtype, quoted, pflags, fl
return ((char *)NULL);
}
- if (valid_parameter_transform (xform) == 0)
+ if (xform[0] == 0 || valid_parameter_transform (xform) == 0)
{
this_command_name = oname;
#if 0 /* TAG: bash-5.2 Martin Schulte <gnu@schrader-schulte.de> 10/2020 */
--
2.34.1

View File

@@ -15,6 +15,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
file://use_aclocal.patch \
file://makerace.patch \
file://makerace2.patch \
file://CVE-2022-3715.patch \
"
SRC_URI[tarball.sha256sum] = "5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558"