]> git.ipfire.org Git - thirdparty/systemd.git/commit
polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
authorJan Synacek <jsynacek@redhat.com>
Fri, 31 Jan 2020 14:17:25 +0000 (15:17 +0100)
committerLukas Nykryn <lnykryn@redhat.com>
Thu, 6 Feb 2020 09:41:56 +0000 (10:41 +0100)
commit2ec3c78b1d1ba907cd888aac3cdc3a86c03cda90
treedc2262f182fc57430bf517532f3880dc214d63e9
parent73b87f8c73af714a32e7b56b217cd4e4f46a5ea7
polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it

Previously, when doing an async PK query we'd store the original
callback/userdata pair and call it again after the PK request is
complete. This is problematic, since PK queries might be slow and in the
meantime the userdata might be released and re-acquired. Let's avoid
this by always traversing through the message handlers so that we always
re-resolve the callback and userdata pair and thus can be sure it's
up-to-date and properly valid.

Resolves: CVE-2020-1712
src/shared/bus-util.c