[PATCH v2 2/2] awk: add tests for CVE-2022-30065

Natanael Copa ncopa at alpinelinux.org
Fri Jun 17 15:45:35 UTC 2022


Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
---
 testsuite/awk.tests | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 93e25d8c1..6c3a03c37 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -479,4 +479,15 @@ testing 'awk backslash+newline eaten with no trace' \
 	"Hello world\n" \
 	'' ''
 
+testing 'awk use-after-free (CVE-2022-30065)' \
+	"awk '\$3i\$3in\$9=\$r||\$9=i6/6-9f'" \
+	"" \
+	"" \
+	""
+
+testing 'awk assign while test' \
+	"awk '\$1==\$1=\"foo\" {print \$1}'" \
+	"foo\n" \
+	"" \
+	"foo"
 exit $FAILCOUNT
-- 
2.36.1



More information about the busybox mailing list