diff --git a/backport-CVE-2022-30065.patch b/backport-CVE-2022-30065.patch new file mode 100644 index 0000000000000000000000000000000000000000..88ed5f3b3445d39ea43ed8eeb4b6748834952786 --- /dev/null +++ b/backport-CVE-2022-30065.patch @@ -0,0 +1,45 @@ +From eb8e04650c2da4d386511948f75d919b492f6ab8 Mon Sep 17 00:00:00 2001 +From: lvgenggeng +Date: Fri, 19 Aug 2022 10:19:30 +0800 +Subject: [PATCH] backport from upstream: + https://git.busybox.net/busybox/commit/?id=e63d7cdfdac78c6fd27e9e63150335767592b85e + https://git.alpinelinux.org/aports/plain/main/busybox/CVE-2022-30065.patch + +Signed-off-by: lvgenggeng +--- + editors/awk.c | 3 +++ + testsuite/awk.tests | 6 ++++++ + 2 files changed, 9 insertions(+) + +diff --git a/editors/awk.c b/editors/awk.c +index f6314ac..654cbac 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -3114,6 +3114,9 @@ static var *evaluate(node *op, var *res) + + case XC( OC_MOVE ): + debug_printf_eval("MOVE\n"); ++ /* make sure that we never return a temp var */ ++ if (L.v == TMPVAR0) ++ L.v = res; + /* if source is a temporary string, jusk relink it to dest */ + if (R.v == TMPVAR1 + && !(R.v->type & VF_NUMBER) +diff --git a/testsuite/awk.tests b/testsuite/awk.tests +index bcaafe8..09d5381 100755 +--- a/testsuite/awk.tests ++++ b/testsuite/awk.tests +@@ -469,4 +469,10 @@ testing 'awk printf %% prints one %' \ + "%\n" \ + '' '' + ++testing 'awk assign while test' \ ++ "awk '\$1==\$1=\"foo\" {print \$1}'" \ ++ "foo\n" \ ++ "" \ ++ "foo" ++ + exit $FAILCOUNT +-- +2.20.1 + diff --git a/busybox.spec b/busybox.spec index e613b37c3891cf0d1e81897f3a71d850fd36f171..8686e835da2cdd238104ff755e33c4c5a5bdf13f 100644 --- a/busybox.spec +++ b/busybox.spec @@ -4,7 +4,7 @@ %endif %if "%{!?RELEASE:1}" -%define RELEASE 16 +%define RELEASE 17 %endif Epoch: 1 @@ -21,6 +21,7 @@ Source2: busybox-petitboot.config Source3: busybox-dynamic.config Patch6000: backport-CVE-2022-28391.patch +Patch6001: backport-CVE-2022-30065.patch BuildRoot: %_topdir/BUILDROOT #Dependency @@ -96,6 +97,12 @@ install -m 644 docs/busybox.dynamic.1 $RPM_BUILD_ROOT/%{_mandir}/man1/busybox.1 %{_mandir}/man1/busybox.petitboot.1.gz %changelog +* Fri Aug 19 2022 lvgenggeng - 1:1.34.1-17 +- Type:CVE +- Id:NA +- SUG:NA +- DESC:fix CVE-2022-30065 + * Thu Jul 28 2022 jikui - 1:1.34.1-16 - Type:bugfix - Id:NA