Polkit Explained

Polkit
polkit
Screenshot Size:300px
Developer:David Zeuthen, Red Hat
Programming Language:C
Operating System:Linux, Unix-like
Genre:Privilege authorization
License:LGPL (free software)

Polkit (formerly PolicyKit) is a component for controlling system-wide privileges in Unix-like operating systems. It provides an organized way for non-privileged processes to communicate with privileged ones. Polkit allows a level of control of centralized system policy. It is developed and maintained by David Zeuthen from Red Hat and hosted by the freedesktop.org project. It is published as free software under the terms of version 2 of the GNU Lesser General Public License.[1]

Since version 0.105, released in April 2012,[2] [3] the name of the project was changed from PolicyKit to polkit to emphasize that the system component was rewritten[4] and that the API had changed, breaking backward compatibility.[5]

Fedora became the first distribution to include PolicyKit, and it has since been used in other distributions, including Ubuntu since version 8.04 and openSUSE since version 10.3. Some distributions, like Fedora,[6] have already switched to the rewritten polkit.

It is also possible to use polkit to execute commands with elevated privileges using the command pkexec followed by the command intended to be executed (with root permission).[7] However, it may be preferable to use sudo, as this command provides more flexibility and security, in addition to being easier to configure.[8]

Implementation

The polkitd daemon implements Polkit functionality.[9]

Vulnerability

PwnKit
Discoverer:Qualys Research Team
Affected Hardware:All architectures
Affected Software:Polkit (all versions prior to discovery)
Used By:Default on every major Linux distribution

A memory corruption vulnerability PwnKit (CVE-2021-4034[10]) discovered in the pkexec command (installed on all major Linux distributions) was announced on January 25, 2022.[11] [12] The vulnerability dates back to the original distribution from 2009. The vulnerability received a CVSS score of 7.8 ("High severity") reflecting serious factors involved in a possible exploit: unprivileged users can gain full root privileges, regardless of the underlying machine architecture or whether the polkit daemon is running or not.

See also

External links

Notes and References

  1. Web site: polkit Git COPYING . David Zeuthen . 15 November 2012.
  2. Web site: polkit Git NEWS . David Zeuthen . 15 November 2012.
  3. Web site: Polkit releases . 1 September 2018.
  4. Web site: Chapter 9. PolicyKit . openSUSE Security Guide . Novell, Inc. and contributors . 15 November 2012 . https://web.archive.org/web/20120827183819/http://doc.opensuse.org/documentation/html/openSUSE_113/opensuse-security/cha.security.policykit.html . 27 August 2012 . dead .
  5. Web site: Polkit and KDE: let's make the point of the situation . 22 December 2009 . 15 November 2012.
  6. Web site: Features/PolicyKitOne . Fedora Project Wiki . 15 November 2012.
  7. Web site: pkexec. polkit Reference Manual. 25 May 2013.
  8. Web site: When to use pkexec vs. gksu/gksudo?. 25 May 2013.
  9. Book: Команда разработчиков BLFS. 4: Bezopasnost'. За пределами проекта "Linux® с нуля". Версия 7.4. 5 September 2017. Beyond Linux from scratch. ru. 1. Moscow. Litres. 2017. 169. 9785457831186. 5 September 2017.
  10. Web site: CVE listing for CVE-2021-4034. Mitre. January 25, 2022.
  11. Web site: PwnKit: Local Privilege Escalation Vulnerability Discovered in polkit's pkexec (CVE-2021-4034). Qualys. January 25, 2022. January 25, 2022.
  12. Web site: Major Linux PolicyKit security vulnerability uncovered: Pwnkit. ZDNet. January 25, 2022. January 25, 2022.