diff options
author | Andrii Bordunov via Openembedded-core <openembedded-core@lists.openembedded.org> | 2019-08-13 23:25:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-08 22:52:28 +0100 |
commit | 9da2eb4bef29c4cb86fc825088be3df5c615cfb2 (patch) | |
tree | 5e72ea267e5efb53144894514d5f5d23f316685c /meta/recipes-core/glib-2.0 | |
parent | fe27c50545eef60837733feab5ed5a2f6b83e518 (diff) | |
download | poky-9da2eb4bef29c4cb86fc825088be3df5c615cfb2.tar.gz |
glib-2.0: fix CVE-2019-13012
(From OE-Core rev: 51f7ecf2259e1fb669cd84c5317cbd8810d731b7)
Signed-off-by: Kevin Weng <t-keweng@microsoft.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-13012.patch | 47 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-13012.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-13012.patch new file mode 100644 index 0000000000..29c5d98402 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-13012.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From c7f7fd53780f8caebccc903d61ffc21632b46a6c Mon Sep 17 00:00:00 2001 | ||
2 | From: Matthias Clasen <mclasen@redhat.com> | ||
3 | Date: Tue, 22 Jan 2019 13:26:31 -0500 | ||
4 | Subject: [PATCH] keyfile settings: Use tighter permissions | ||
5 | |||
6 | When creating directories, create them with 700 permissions, | ||
7 | instead of 777. | ||
8 | |||
9 | Closes: #1658 | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | [https://gitlab.gnome.org/GNOME/glib/commit | ||
13 | /5e4da714f00f6bfb2ccd6d73d61329c6f3a08429] | ||
14 | |||
15 | CVE: CVE-2019-13012 | ||
16 | |||
17 | Signed-off-by: Kevin Weng <t-keweng@microsoft.com> | ||
18 | --- | ||
19 | gio/gkeyfilesettingsbackend.c | 5 +++-- | ||
20 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c | ||
23 | index a37978e83..580a0b0a1 100644 | ||
24 | --- a/gio/gkeyfilesettingsbackend.c | ||
25 | +++ b/gio/gkeyfilesettingsbackend.c | ||
26 | @@ -89,7 +89,8 @@ g_keyfile_settings_backend_keyfile_write (GKeyfileSettingsBackend *kfsb) | ||
27 | |||
28 | contents = g_key_file_to_data (kfsb->keyfile, &length, NULL); | ||
29 | g_file_replace_contents (kfsb->file, contents, length, NULL, FALSE, | ||
30 | - G_FILE_CREATE_REPLACE_DESTINATION, | ||
31 | + G_FILE_CREATE_REPLACE_DESTINATION | | ||
32 | + G_FILE_CREATE_PRIVATE, | ||
33 | NULL, NULL, NULL); | ||
34 | |||
35 | compute_checksum (kfsb->digest, contents, length); | ||
36 | @@ -640,7 +641,7 @@ g_keyfile_settings_backend_new (const gchar *filename, | ||
37 | |||
38 | kfsb->file = g_file_new_for_path (filename); | ||
39 | kfsb->dir = g_file_get_parent (kfsb->file); | ||
40 | - g_file_make_directory_with_parents (kfsb->dir, NULL, NULL); | ||
41 | + g_mkdir_with_parents (g_file_peek_path (kfsb->dir), 0700); | ||
42 | |||
43 | kfsb->file_monitor = g_file_monitor (kfsb->file, 0, NULL, NULL); | ||
44 | kfsb->dir_monitor = g_file_monitor (kfsb->dir, 0, NULL, NULL); | ||
45 | -- | ||
46 | 2.22.0 | ||
47 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb index f007596968..611abd8eb8 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
17 | file://CVE-2019-12450.patch \ | 17 | file://CVE-2019-12450.patch \ |
18 | file://CVE-2019-9633_p1.patch \ | 18 | file://CVE-2019-9633_p1.patch \ |
19 | file://CVE-2019-9633_p2.patch \ | 19 | file://CVE-2019-9633_p2.patch \ |
20 | file://CVE-2019-13012.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" |