How to fix?
Given the breadth of the attack surface for PwnKit across most Linux-based systems, users should apply patches or mitigations for this vulnerability immediately. This vulnerability was reported to Linux vendors on November 18, 2021, following which patches have already been issued by Red Hat and Ubuntu.
Ubuntu has already pushed updates for PolicyKit to address this vulnerability in versions 14.04 and 16.04 ESM (extended security maintenance) as well as in more recent versions 18.04, 20.04, and 21.04. Users just need to run a standard system update and then reboot the system for the changes to take effect.
Red Hat has also released a security update for Polkit on Workstation and Enterprise products for supported architectures, as well as for extended life cycle support, TUS, and AUS.
We expect all other vendors to release patches for this vulnerability very shortly.
If no patches are available for your operating system, you can remove the SUID-bit from pkexec as a temporary mitigation. Please note that this change might affect your system in adverse ways, so apply this workaround with caution. It is also advised that regression testing of the system be done in order to ensure nothing critical has been broken as a result of the change.
Example SUID-bit command:
# chmod 0755 /usr/bin/pkexec