CVE-2021-3560: Red Hat Polkit Incorrect Authorization Vulnerability
It was found that polkit could be tricked into bypassing the credential checks for D-Bus requests, elevating the privileges of the requestor to the root user. This flaw could be used by an unprivileged local attacker to, for example, create a new local administrator. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Other sources
Red Hat Polkit contains an incorrect authorization vulnerability through the bypassing of credential checks for D-Bus requests, allowing for privilege escalation.
— CISA
The function polkitsystembusnamegetcredssync is used to get the uid and pid of the process requesting the action. It does this by sending the unique bus name of the requesting process, which is typically something like “:1.96”, to dbus-daemon. These unique names are assigned and managed by dbus-daemon and cannot be forged, so this is a good way to check the privileges of the requesting process.
The vulnerability happens when the requesting process disconnects from dbus-daemon just before the call to polkitsystembusnamegetcredssync starts. In this scenario, the unique bus name is no longer valid, so dbus-daemon sends back an error reply. This error case is handled in polkitsystembusnamegetcredssync by setting the value of the error parameter, but it still returns TRUE, rather than FALSE.
This behavior means that all callers of polkitsystembusnamegetcredssync need to carefully check whether an error was set. If the calling function forgets to check for errors then it will think that the uid of the requesting process is 0 (because the AsyncGetBusNameCredsData struct is zero initialized). In other words, it will think that the action was requested by a root process, and will therefore allow it.
Certain calltraces in polkit were found to be vulnerable, and could be used by any local attacker to run Polkit method calls as if there were run by root.
To summarize : this allows to call certain DBus methods as if it was requested by the root users. Depending on the available DBus destinations, this could allow any local user to install packages, create new administrators, etc.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/polkitto a version that resolves this vulnerability.Fixed in 0:0.115-11.el8_4.1 - Upgrade
Upgrade
redhat/polkitto a version that resolves this vulnerability.Fixed in 0:0.115-9.el8_1.1 - Upgrade
Upgrade
redhat/polkitto a version that resolves this vulnerability.Fixed in 0:0.115-11.el8_2.1 - Upgrade
Upgrade
redhat/cri-oto a version that resolves this vulnerability.Fixed in 0:1.20.3-6.rhaos4.7.git0d0f863.el8 - Upgrade
Upgrade
redhat/dhcpto a version that resolves this vulnerability.Fixed in 12:4.3.6-41.el8_3.1 - Upgrade
Upgrade
redhat/openshift-clientsto a version that resolves this vulnerability.Fixed in 0:4.7.0-202106252127.p0.git.8b4b094.el7 - Upgrade
Upgrade
redhat/openshift-kuryrto a version that resolves this vulnerability.Fixed in 0:4.7.0-202106232224.p0.git.c7654fb.el8 - Upgrade
Upgrade
redhat/polkitto a version that resolves this vulnerability.Fixed in 0:0.115-11.el8_3.2 - Upgrade
Upgrade
redhat/redhat-virtualization-hostto a version that resolves this vulnerability.Fixed in 0:4.4.6-20210615.0.el8_4 - Upgrade
Upgrade
redhat/polkitto a version that resolves this vulnerability.Fixed in 0.119
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-3560?
CVE-2021-3560 is a vulnerability in Red Hat Polkit that allows unprivileged local attackers to bypass credential checks and elevate their privileges.
How does CVE-2021-3560 impact Red Hat Polkit?
CVE-2021-3560 allows unprivileged local attackers to bypass credential checks and gain root access, potentially allowing them to create a new local administrator.
What is the severity of CVE-2021-3560?
The severity of CVE-2021-3560 is high, with a CVSS score of 7.8.
How can I fix CVE-2021-3560?
To fix CVE-2021-3560, users should update Red Hat Polkit to version 0.119 or apply the appropriate security patch provided by Red Hat.
Where can I find more information about CVE-2021-3560?
For more information about CVE-2021-3560, you can refer to the following resources: [Bugzilla - CVE-2021-3560](https://bugzilla.redhat.com/show_bug.cgi?id=1961710), [Bugzilla - CVE-2021-3560](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1967424), [Red Hat Security Advisory - RHSA-2021:2236](https://access.redhat.com/errata/RHSA-2021:2236)