diff options
author | Mikko Rapeli <mikko.rapeli@bmw.de> | 2021-01-05 12:18:20 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-13 08:57:57 +0000 |
commit | b8d9f563e8f2653862c99a574522b422325b6357 (patch) | |
tree | aeb45d5d76bdbe791ae5b00687ae980b6e1fe9ff /meta/recipes-core | |
parent | 65d47dddf58c31ecfbb3ac63966d49fc920fcb4a (diff) | |
download | poky-b8d9f563e8f2653862c99a574522b422325b6357.tar.gz |
glib-2.0: add patch for CVE-2020-35457
Upstream has disputed CVE-2020-35457 claiming it's not exploitable but
the patch is simple to add.
https://security-tracker.debian.org/tracker/CVE-2020-35457
"https://gitlab.gnome.org/GNOME/glib/-/commit/63c5b62f0a984fac9a9700b12f54fe878e016a5d
https://gitlab.gnome.org/GNOME/glib/-/issues/2197
Upstream position is that it is not realistically a security issue."
For master branch this CVE is not reported by CVE checker:
NOTE: glib-2.0-2.66.4 is not vulnerable to CVE-2020-35457
(From OE-Core rev: 196d6a668fb44ac3f69d791d42d2eead285a758e)
Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0001-goption-Add-a-precondition-to-avoid-GOptionEntry-lis.patch | 41 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-goption-Add-a-precondition-to-avoid-GOptionEntry-lis.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-goption-Add-a-precondition-to-avoid-GOptionEntry-lis.patch new file mode 100644 index 0000000000..17dcada613 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-goption-Add-a-precondition-to-avoid-GOptionEntry-lis.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 63c5b62f0a984fac9a9700b12f54fe878e016a5d Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Withnall <withnall@endlessm.com> | ||
3 | Date: Wed, 2 Sep 2020 12:38:09 +0100 | ||
4 | Subject: [PATCH] goption: Add a precondition to avoid GOptionEntry list | ||
5 | overflow | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | If the calling code adds more option entries than `G_MAXSIZE` then | ||
11 | there’ll be an integer overflow. This seems vanishingly unlikely (given | ||
12 | that all callers use static option entry lists), but add a precondition | ||
13 | anyway. | ||
14 | |||
15 | Signed-off-by: Philip Withnall <withnall@endlessm.com> | ||
16 | |||
17 | Fixes: #2197 | ||
18 | --- | ||
19 | glib/goption.c | 2 ++ | ||
20 | 1 file changed, 2 insertions(+) | ||
21 | |||
22 | CVE: CVE-2020-35457 | ||
23 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/63c5b62f0a984fac9a9700b12f54fe878e016a5d] | ||
24 | Comment: adjusted offset by -5 to fix patch fuzz warning | ||
25 | |||
26 | diff --git a/glib/goption.c b/glib/goption.c | ||
27 | index 9f5b977c4..bb9093a33 100644 | ||
28 | --- a/glib/goption.c | ||
29 | +++ b/glib/goption.c | ||
30 | @@ -2417,6 +2417,8 @@ g_option_group_add_entries (GOptionGroup *group, | ||
31 | |||
32 | for (n_entries = 0; entries[n_entries].long_name != NULL; n_entries++) ; | ||
33 | |||
34 | + g_return_if_fail (n_entries <= G_MAXSIZE - group->n_entries); | ||
35 | + | ||
36 | group->entries = g_renew (GOptionEntry, group->entries, group->n_entries + n_entries); | ||
37 | |||
38 | /* group->entries could be NULL in the trivial case where we add no | ||
39 | -- | ||
40 | 2.20.1 | ||
41 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb index 09d253fbfb..0ad14a0878 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
17 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ | 17 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ |
18 | file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ | 18 | file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ |
19 | file://tzdata-update.patch \ | 19 | file://tzdata-update.patch \ |
20 | file://0001-goption-Add-a-precondition-to-avoid-GOptionEntry-lis.patch \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | SRC_URI_append_class-native = " file://relocate-modules.patch" | 23 | SRC_URI_append_class-native = " file://relocate-modules.patch" |