blob: 76308ffdb988be91d93a7bc65d5d51aaedc7f8c3 [file] [log] [blame]
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05001From a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 Mon Sep 17 00:00:00 2001
2From: Jan Rybar <jrybar@redhat.com>
3Date: Wed, 2 Jun 2021 15:43:38 +0200
4Subject: [PATCH] GHSL-2021-074: authentication bypass vulnerability in polkit
5
6initial values returned if error caught
7
William A. Kennington III49e95662021-09-15 16:19:36 -07008CVE: CVE-2021-3560
9
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050010Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81]
11
12Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
13---
14 src/polkit/polkitsystembusname.c | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c
18index 8daa12c..8ed1363 100644
19--- a/src/polkit/polkitsystembusname.c
20+++ b/src/polkit/polkitsystembusname.c
21@@ -435,6 +435,9 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus
22 while (!((data.retrieved_uid && data.retrieved_pid) || data.caught_error))
23 g_main_context_iteration (tmp_context, TRUE);
24
25+ if (data.caught_error)
26+ goto out;
27+
28 if (out_uid)
29 *out_uid = data.uid;
30 if (out_pid)
31--
322.29.2
33