File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ From 5cf8b332429a1dd9afef3337bae92aeddaeff993 Mon Sep 17 00:00:00 2001
2+ From: Valery Ushakov <uwe@stderr.spb.ru>
3+ Date: Wed, 24 Jan 2024 22:24:41 +0300
4+ Subject: [PATCH] awk.c: fix CVE-2023-42366 (bug #15874)
5+
6+ Make sure we don't read past the end of the string in next_token()
7+ when backslash is the last character in an (invalid) regexp.
8+ ---
9+ editors/awk.c | 6 ++++--
10+ 1 file changed, 4 insertions(+), 2 deletions(-)
11+
12+ diff --git a/editors/awk.c b/editors/awk.c
13+ index 728ee8685..be48df7c7 100644
14+ --- a/editors/awk.c
15+ +++ b/editors/awk.c
16+ @@ -1165,9 +1165,11 @@ static uint32_t next_token(uint32_t expected)
17+ s[-1] = bb_process_escape_sequence((const char **)&pp);
18+ if (*p == '\\')
19+ *s++ = '\\';
20+ - if (pp == p)
21+ + if (pp == p) {
22+ + if (*p == '\0')
23+ + syntax_error(EMSG_UNEXP_EOS);
24+ *s++ = *p++;
25+ - else
26+ + } else
27+ p = pp;
28+ }
29+ }
30+ - -
31+ 2.34.1
32+
Original file line number Diff line number Diff line change 11Summary: Statically linked binary providing simplified versions of system commands
22Name: busybox
33Version: 1.36.1
4- Release: 8 %{?dist }
4+ Release: 9 %{?dist }
55License: GPLv2
66Vendor: Microsoft Corporation
77Distribution: Azure Linux
@@ -12,9 +12,10 @@ Source2: busybox-petitboot.config
1212Patch0: busybox-1.31.1-stime-fix.patch
1313Patch1: CVE-2022-28391.patch
1414Patch2: CVE-2021-42380.patch
15- # Also Fixes CVE-2023-42364
1615Patch3: CVE-2023-42363.patch
16+ # Also Fixes CVE-2023-42364
1717Patch4: CVE-2023-42365.patch
18+ Patch5: CVE-2023-42366.patch
1819BuildRequires: gcc
1920BuildRequires: glibc-static >= 2.38-8%{?dist }
2021BuildRequires: libselinux-devel >= 1.27.7-2
@@ -103,6 +104,9 @@ SKIP_KNOWN_BUGS=1 ./runtest
103104%{_mandir }/man1/busybox.petitboot.1.gz
104105
105106%changelog
107+ * Tue Nov 12 2024 Ankita Pareek <ankitapareek@microsoft.com> - 1.36.1-9
108+ - Address CVE-2023-42366
109+
106110* Mon Aug 26 2024 Rachel Menge <rachelmenge@microsoft.com> - 1.36.1-8
107111- Update to build dep latest glibc-static version
108112
You can’t perform that action at this time.
0 commit comments