summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2023-10-19 15:21:43 +0530
committerSteve Sakoman <steve@sakoman.com>2023-10-25 04:45:50 -1000
commit024fa046fc81d87d488a0d41cabcd0872ef0b1e3 (patch)
tree6ed360cc7fb3716816f1c1f385c72a534a099570
parent7725c28871d1d8624e5f7f5c0536d2a2f0d68a02 (diff)
downloadpoky-024fa046fc81d87d488a0d41cabcd0872ef0b1e3.tar.gz
gawk: backport Debian patch to fix CVE-2023-4156
Upstream-Status: Backport [https://git.launchpad.net/ubuntu/+source/gawk/tree/debian/patches?h=ubuntu/jammy-security & https://git.savannah.gnu.org/gitweb/?p=gawk.git;a=commitdiff;h=e709eb829448ce040087a3fc5481db6bfcaae212] (From OE-Core rev: 0547b60d3485c2e3853e5a9e0a3e051882b283f3) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch28
-rw-r--r--meta/recipes-extended/gawk/gawk_5.1.1.bb1
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch b/meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch
new file mode 100644
index 0000000000..bc157d6afb
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch
@@ -0,0 +1,28 @@
1From e709eb829448ce040087a3fc5481db6bfcaae212 Mon Sep 17 00:00:00 2001
2From: "Arnold D. Robbins" <arnold@skeeve.com>
3Date: Wed, 3 Aug 2022 13:00:54 +0300
4Subject: [PATCH] Smal bug fix in builtin.c.
5
6Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/gawk/tree/debian/patches/CVE-2023-4156.patch?h=ubuntu/jammy-security
7Upstream commit https://git.savannah.gnu.org/gitweb/?p=gawk.git;a=commitdiff;h=e709eb829448ce040087a3fc5481db6bfcaae212]
8CVE: CVE-2023-4156
9Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
10---
11 ChangeLog | 6 ++++++
12 builtin.c | 5 ++++-
13 2 files changed, 10 insertions(+), 1 deletion(-)
14
15--- gawk-5.1.0.orig/builtin.c
16+++ gawk-5.1.0/builtin.c
17@@ -957,7 +957,10 @@ check_pos:
18 s1++;
19 n0--;
20 }
21- if (val >= num_args) {
22+ // val could be less than zero if someone provides a field width
23+ // so large that it causes integer overflow. Mainly fuzzers do this,
24+ // but let's try to be good anyway.
25+ if (val < 0 || val >= num_args) {
26 toofew = true;
27 break;
28 }
diff --git a/meta/recipes-extended/gawk/gawk_5.1.1.bb b/meta/recipes-extended/gawk/gawk_5.1.1.bb
index fe339805d0..0b0d0897bc 100644
--- a/meta/recipes-extended/gawk/gawk_5.1.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.1.1.bb
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://remove-sensitive-tests.patch \ 19 file://remove-sensitive-tests.patch \
20 file://run-ptest \ 20 file://run-ptest \
21 file://CVE-2023-4156.patch \
21 " 22 "
22 23
23SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd" 24SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd"