summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch
diff options
context:
space:
mode:
authorNeetika Singh <Neetika.Singh@kpit.com>2021-11-30 21:00:11 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-08 20:28:00 +0000
commit090075eb3a7499d350dbd3ccd4c45711bd37ddba (patch)
tree7099ef2c4baf833fcdcadfb7fffa5eb4af917474 /meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch
parentd875c5e57b91c415292e530ce90f354107581be6 (diff)
downloadpoky-090075eb3a7499d350dbd3ccd4c45711bd37ddba.tar.gz
glib-2.0: Add security fixes
Add patches for below CVE issues: CVE-2021-27218 CVE-2021-27219 CVE-2021-28153 Link: https://mirrors.ocf.berkeley.edu/ubuntu/pool/main/g/glib2.0/glib2.0_2.64.6-1~ubuntu20.04.3.debian.tar.xz Also, add regression patchs for CVE-2021-27219. CVE-2021-27219-reg1-3.patch is not relevant for glib2.0 v2.64 (From OE-Core rev: 4fb30dd540b1fb56a14237e21e84b22f8b515dc5) Signed-off-by: Neetika.Singh <Neetika.Singh@kpit.com> Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch
new file mode 100644
index 0000000000..dd43689aae
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg2-1.patch
@@ -0,0 +1,49 @@
1From cb9ee701ef46c1819eed4e2a4dc181682bdfc176 Mon Sep 17 00:00:00 2001
2From: Philip Withnall <pwithnall@endlessos.org>
3Date: Wed, 10 Feb 2021 21:16:39 +0000
4Subject: [PATCH 1/3] gkeyfilesettingsbackend: Fix basename handling when group
5 is unset
6
7Fix an effective regression in commit
87781a9cbd2fd0aa84bee0f4eee88470640ff6706, which happens when
9`convert_path()` is called with a `key` which contains no slashes. In
10that case, the `key` is entirely the `basename`.
11
12Prior to commit 7781a9cb, the code worked through a fluke of `i == -1`
13cancelling out with the various additions in the `g_memdup()` call, and
14effectively resulting in `g_strdup (key)`.
15
16Spotted by Guido Berhoerster.
17
18Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
19
20Upstream-Status: Backport [https://mirrors.ocf.berkeley.edu/ubuntu/pool/main/g/glib2.0/glib2.0_2.64.6-1~ubuntu20.04.3.debian.tar.xz]
21CVE: CVE-2021-27219
22Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
23
24---
25 gio/gkeyfilesettingsbackend.c | 7 ++++++-
26 1 file changed, 6 insertions(+), 1 deletion(-)
27
28diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
29index 25b057672..861c3a661 100644
30--- a/gio/gkeyfilesettingsbackend.c
31+++ b/gio/gkeyfilesettingsbackend.c
32@@ -185,7 +185,12 @@ convert_path (GKeyfileSettingsBackend *kfsb,
33 }
34
35 if (basename)
36- *basename = g_memdup2 (last_slash + 1, key_len - (last_slash - key));
37+ {
38+ if (last_slash != NULL)
39+ *basename = g_memdup2 (last_slash + 1, key_len - (last_slash - key));
40+ else
41+ *basename = g_strdup (key);
42+ }
43
44 return TRUE;
45 }
46--
47GitLab
48
49