summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorMarta Rybczynska <rybczynska@gmail.com>2022-02-18 11:05:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-02 00:21:36 +0000
commit877ea55a5bf084de0543b9b4a5b3bb8d2105ee95 (patch)
treea48ab224caf3d4a2ad1a0877cbeedd8124404498 /meta/recipes-bsp
parentba476f819f8c122d1d26222986a4a8a2966a6246 (diff)
downloadpoky-877ea55a5bf084de0543b9b4a5b3bb8d2105ee95.tar.gz
grub: fix an unitialized re_token in gnulib
This patch adds a fix for an unitialized re_token in grub's gnulib. It is a part of a security series [1]. [1] https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00007.html (From OE-Core rev: 0ce9c21b776ef6bfeaef665829324d7a04c22ce9) Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/files/0012-gnulib-regcomp-Fix-uninitialized-re_token.patch55
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0012-gnulib-regcomp-Fix-uninitialized-re_token.patch b/meta/recipes-bsp/grub/files/0012-gnulib-regcomp-Fix-uninitialized-re_token.patch
new file mode 100644
index 0000000000..0507e0cd66
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0012-gnulib-regcomp-Fix-uninitialized-re_token.patch
@@ -0,0 +1,55 @@
1From 512b6bb380a77233b88c84b7a712896c70281d2f Mon Sep 17 00:00:00 2001
2From: Darren Kenny <darren.kenny@oracle.com>
3Date: Tue, 24 Nov 2020 18:04:22 +0000
4Subject: [PATCH] gnulib/regcomp: Fix uninitialized re_token
5
6This issue has been fixed in the latest version of gnulib, so to
7maintain consistency, I've backported that change rather than doing
8something different.
9
10Fixes: CID 73828
11
12Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
13Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
14
15Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=03477085f9a33789ba6cca7cd49ab9326a1baa0e]
16Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com>
17---
18 conf/Makefile.extra-dist | 1 +
19 .../gnulib-patches/fix-regcomp-uninit-token.patch | 15 +++++++++++++++
20 2 files changed, 16 insertions(+)
21 create mode 100644 grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
22
23diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
24index d27d3a9..ffe6829 100644
25--- a/conf/Makefile.extra-dist
26+++ b/conf/Makefile.extra-dist
27@@ -30,6 +30,7 @@ EXTRA_DIST += grub-core/genemuinitheader.sh
28
29 EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-deref.patch
30 EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-state-deref.patch
31+EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
32 EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
33 EXTRA_DIST += grub-core/lib/gnulib-patches/fix-uninit-structure.patch
34 EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
35diff --git a/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch b/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
36new file mode 100644
37index 0000000..02e0631
38--- /dev/null
39+++ b/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
40@@ -0,0 +1,15 @@
41+--- a/lib/regcomp.c 2020-11-24 17:06:08.159223858 +0000
42++++ b/lib/regcomp.c 2020-11-24 17:06:15.630253923 +0000
43+@@ -3808,11 +3808,7 @@
44+ create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
45+ re_token_type_t type)
46+ {
47+- re_token_t t;
48+-#if defined GCC_LINT || defined lint
49+- memset (&t, 0, sizeof t);
50+-#endif
51+- t.type = type;
52++ re_token_t t = { .type = type };
53+ return create_token_tree (dfa, left, right, &t);
54+ }
55+
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index e7168e75ea..4ddb9fc4f1 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -58,6 +58,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
58 file://0009-gnulib-regcomp-Fix-uninitialized-token-structure.patch \ 58 file://0009-gnulib-regcomp-Fix-uninitialized-token-structure.patch \
59 file://0010-gnulib-argp-help-Fix-dereference-of-a-possibly-NULL-.patch \ 59 file://0010-gnulib-argp-help-Fix-dereference-of-a-possibly-NULL-.patch \
60 file://0011-gnulib-regexec-Fix-possible-null-dereference.patch \ 60 file://0011-gnulib-regexec-Fix-possible-null-dereference.patch \
61 file://0012-gnulib-regcomp-Fix-uninitialized-re_token.patch \
61 " 62 "
62SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" 63SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
63SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea" 64SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"