diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-4.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-4.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-4.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-4.patch new file mode 100644 index 0000000000..2c388b4bbb --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2021-27219-reg1-4.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 4506d1859a863087598c8d122740bae25b65b099 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon McVittie <smcv@collabora.com> | ||
3 | Date: Mon, 8 Feb 2021 10:04:48 +0000 | ||
4 | Subject: [PATCH 4/5] gtlspassword: Fix inverted assertion | ||
5 | |||
6 | The intention here was to assert that the length of the password fits | ||
7 | in a gssize. Passwords more than half the size of virtual memory are | ||
8 | probably excessive. | ||
9 | |||
10 | Fixes: a8b204ff "gtlspassword: Forbid very long TLS passwords" | ||
11 | Signed-off-by: Simon McVittie <smcv@collabora.com> | ||
12 | (cherry picked from commit 61bb52ec42de1082bfb06ce1c737fc295bfe60b8) | ||
13 | |||
14 | Upstream-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] | ||
15 | CVE: CVE-2021-27219 | ||
16 | Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> | ||
17 | |||
18 | --- | ||
19 | gio/gtlspassword.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gio/gtlspassword.c b/gio/gtlspassword.c | ||
23 | index dbcec41a8..bd86a6dfe 100644 | ||
24 | --- a/gio/gtlspassword.c | ||
25 | +++ b/gio/gtlspassword.c | ||
26 | @@ -291,7 +291,7 @@ g_tls_password_set_value (GTlsPassword *password, | ||
27 | { | ||
28 | /* FIXME: g_tls_password_set_value_full() doesn’t support unsigned gsize */ | ||
29 | gsize length_unsigned = strlen ((gchar *) value); | ||
30 | - g_return_if_fail (length_unsigned > G_MAXSSIZE); | ||
31 | + g_return_if_fail (length_unsigned <= G_MAXSSIZE); | ||
32 | length = (gssize) length_unsigned; | ||
33 | } | ||
34 | |||
35 | -- | ||
36 | GitLab | ||
37 | |||
38 | |||