[…]Polkit, previously known as PolicyKit, is a tool for setting up policies governing how unprivileged processes interact with privileged ones. The vulnerability resides within polkit’s
pkexec, a SUID-root program that’s installed by default on all major Linux distributions. Designated CVE-2021-4034, the vulnerability has been given a CVSS score of 7.8.
Bharat Jogi, director of vulnerability and threat research at Qualys, explained in a blog post that the
pkexecflaw opens the door to root privileges for an attacker. Qualys researchers, he said, have demonstrated exploitation on default installations of Ubuntu, Debian, Fedora, and CentOS, and other Linux distributions are presumed to be vulnerable as well.
“This vulnerability has been hiding in plain sight for 12+ years and affects all versions of
pkexecsince its first version in May 2009,” said Jogi, pointing to commit c8c3d83, which added a
The problem occurs when
main()function processes command-line arguments and
argc– the ARGument Count – is zero. The function tries to access the list of arguments anyway, and ends up trying to use an empty
argv– the ARGument Vector of command-line argument strings. As a result, out-of-bounds memory gets read and written, which an attacker can exploit to inject an environment variable that can cause arbitrary code to be loaded from storage and run by the program as root.
At least the exploitation technique proposed by Qualys – injecting the
pkexec‘s environment to execute a shared library as root – leaves traces in log files.
Organisational Structures | Technology and Science | Military, IT and Lifestyle consultancy | Social, Broadcast & Cross Media | Flying aircraft