CVE-2021-4034: Red Hat Polkit Out-of-Bounds Read and Write Vulnerability

Published Nov 23, 2021
·
Updated

A Local Privilege Escalation vulnerability (from any user to root) was found in polkit's pkexec, a SUID-root program that is installed by default on every major Linux distribution.

Other sources

A local privilege escalation vulnerability was found on polkit's pkexec utility. The pkexec application is a setuid tool designed to allow unprivileged users to run commands as privileged users according predefined policies. The current version of pkexec doesn't handle the calling parameters count correctly and ends trying to execute environment variables as commands. An attacker can leverage this by crafting environment variables in such a way it'll induce pkexec to execute arbitrary code. When successfully executed the attack can cause a local privilege escalation given unprivileged users administrative rights on the target machine.

The Red Hat polkit pkexec utility contains an out-of-bounds read and write vulnerability that allows for privilege escalation with administrative rights.

CISA

Affected Software

70 affected componentsFixes available
redhat/polkit<0:0.96-11.el6_10.2
0:0.96-11.el6_10.2
redhat/polkit<0:0.112-26.el7_9.1
0:0.112-26.el7_9.1
redhat/polkit<0:0.112-12.el7_3.1
0:0.112-12.el7_3.1
redhat/polkit<0:0.112-12.el7_4.2
0:0.112-12.el7_4.2
redhat/polkit<0:0.112-18.el7_6.3
0:0.112-18.el7_6.3
redhat/polkit<0:0.112-22.el7_7.2
0:0.112-22.el7_7.2
redhat/polkit<0:0.115-13.el8_5.1
0:0.115-13.el8_5.1
redhat/polkit<0:0.115-9.el8_1.2
0:0.115-9.el8_1.2
redhat/polkit<0:0.115-11.el8_2.2
0:0.115-11.el8_2.2
redhat/polkit<0:0.115-11.el8_4.2
0:0.115-11.el8_4.2
redhat/redhat-virtualization-host<0:4.3.21-20220126.0.el7_9
0:4.3.21-20220126.0.el7_9
Red Hat Polkit
Polkit Project Polkit<121
redhat Enterprise Linux Server Update Services For Sap Solutions=7.6
redhat Enterprise Linux Server Update Services For Sap Solutions=7.7
redhat Enterprise Linux=8.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Eus=8.2
redhat Enterprise Linux For Ibm Z Systems=7.0
redhat Enterprise Linux For Ibm Z Systems=8.0
redhat Enterprise Linux For Ibm Z Systems Eus=8.2
redhat Enterprise Linux For Ibm Z Systems Eus=8.4
redhat Enterprise Linux For Power Big Endian=7.0
redhat Enterprise Linux For Power Little Endian=7.0
redhat Enterprise Linux For Power Little Endian=8.0
redhat Enterprise Linux For Power Little Endian Eus=8.1
redhat Enterprise Linux For Power Little Endian Eus=8.2
redhat Enterprise Linux For Power Little Endian Eus=8.4
redhat Enterprise Linux For Scientific Computing=7.0
redhat Enterprise Linux Server=6.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=7.3
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Aus=7.7
redhat Enterprise Linux Server Aus=8.2
redhat Enterprise Linux Server Aus=8.4
redhat Enterprise Linux Server Eus=8.4
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Server Tus=7.7
redhat Enterprise Linux Server Tus=8.2
redhat Enterprise Linux Server Tus=8.4
redhat Enterprise Linux Server Update Services For Sap Solutions=8.1
redhat Enterprise Linux Server Update Services For Sap Solutions=8.2
redhat Enterprise Linux Server Update Services For Sap Solutions=8.4
redhat Enterprise Linux Workstation=7.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
Canonical Ubuntu Linux=21.10
SUSE Enterprise Storage=7.0
SUSE Linux Enterprise High Performance Computing=15.0-sp2
SUSE Manager Proxy=4.1
SUSE Manager Server=4.1
SUSE Linux Enterprise Desktop=15-sp2
SUSE Linux Enterprise Server=15-sp2
SUSE Linux Enterprise Server Sap=15-sp2
SUSE Linux Enterprise Workstation Extension=12-sp5
Oracle HTTP Server=12.2.1.3.0
Oracle HTTP Server=12.2.1.4.0
Oracle ZFS Storage Appliance Kit=8.8
Siemens Sinumerik Edge<3.3.0
Siemens Scalance Lpe9403 Firmware<2.0
Siemens SCALANCE LPE9403
Starwindsoftware Command Center=1.0-update3_build5871
Starwindsoftware Starwind Hyperconverged Appliance
Starwindsoftware Starwind Virtual San=v8-build14338
All of the following
Siemens Scalance Lpe9403 Firmware<2.0
Siemens SCALANCE LPE9403

Remediation

Information

For customers who cannot update immediately and doesn't have Secure Boot feature enabled, the issue can be mitigated by executing the following steps: 1) Install required systemtap packages and dependencies as per - pointed by https://access.redhat.com/solutions/5441 2) Install polkit debug info: ~~~ debuginfo-install polkit ~~~ 3) Create the following systemtap script, and name it pkexec-block.stp: ~~~ probe process("/usr/bin/pkexec").function("main") { if (cmdline_arg(1) == "") raise(9); } ~~~ 4) Load the systemtap module into the running kernel: ~~~ stap -g -F -m stap_pkexec_block pkexec_block.stp ~~~ 5) Ensure the module is loaded: ~~~ lsmod | grep -i stap_pkexec_block stap_pkexec_block 434176 0 ~~~ 6) Once polkit package was updated to the version containing the fix, the systemtap generated kernel module can be removed by running: ~~~ rmmod stap_pkexec_block ~~~ This mitigation doesn't work for Secure Boot enabled system as SystemTap would require an external compiling server to be able to sign the generated kernel module with a key enrolled into the Kernel's keyring.

Event History

Nov 23, 2021
Data Sourced
via Red Hat·09:16 AM
DescriptionSeverityAffected Software
Jan 25, 2022
CVE Published
05:00 PM
Jan 28, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 27, 2022
Known Exploited
via CISA·12:00 AM
Oct 3, 2024
News Published
via BleepingComputer·02:33 PM
News Published
via BleepingComputer·02:35 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-4034?

CVE-2021-4034 is considered a high severity vulnerability that allows for local privilege escalation.

2

How do I fix CVE-2021-4034?

To fix CVE-2021-4034, update the polkit package to a version that is patched, such as 0:0.96-11.el6_10.2 or higher for Red Hat systems.

3

What causes CVE-2021-4034?

CVE-2021-4034 is caused by an out-of-bounds read and write vulnerability within the pkexec utility of the polkit package.

4

Which systems are affected by CVE-2021-4034?

CVE-2021-4034 affects multiple versions of Red Hat Enterprise Linux and systems using the polkit package, particularly versions prior to the fix releases.

5

Can CVE-2021-4034 be exploited remotely?

No, CVE-2021-4034 requires local access to exploit, as it involves privilege escalation using a setuid tool.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203