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