Exploited
7.8
CWE
125 787 20
Advisory Published
CVE Published
CVE Published
Updated

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

First published: Tue Nov 23 2021(Updated: )

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

Credit: secalert@redhat.com secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
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
Polkit
Ubuntu Polkit Daemon<121
Red Hat Enterprise Linux Server Update Services for SAP Solutions=7.6
Red Hat Enterprise Linux Server Update Services for SAP Solutions=7.7
Red Hat Enterprise Linux=8.0
Red Hat Enterprise Linux Desktop=7.0
Red Hat Enterprise Linux Server EUS=8.2
Red Hat Enterprise Linux for IBM Z Systems=7.0
Red Hat Enterprise Linux for IBM Z Systems=8.0
Red Hat Enterprise Linux for IBM Z Systems (s390x)=8.2
Red Hat Enterprise Linux for IBM Z Systems (s390x)=8.4
Red Hat Enterprise Linux for Power, big endian=7.0
Red Hat Enterprise Linux for Power, little endian=7.0
Red Hat Enterprise Linux for Power, little endian=8.0
Red Hat Enterprise Linux for Power, little endian - Extended Update Support=8.1
Red Hat Enterprise Linux for Power, little endian - Extended Update Support=8.2
Red Hat Enterprise Linux for Power, little endian - Extended Update Support=8.4
Red Hat Enterprise Linux for Scientific Computing=7.0
Red Hat Enterprise Linux Server=6.0
Red Hat Enterprise Linux Server=7.0
Red Hat Enterprise Linux Server=7.3
Red Hat Enterprise Linux Server=7.4
Red Hat Enterprise Linux Server=7.6
Red Hat Enterprise Linux Server=7.7
Red Hat Enterprise Linux Server=8.2
Red Hat Enterprise Linux Server=8.4
Red Hat Enterprise Linux Server=8.4
Red Hat Enterprise Linux Server=7.6
Red Hat Enterprise Linux Server=7.7
Red Hat Enterprise Linux Server=8.2
Red Hat Enterprise Linux Server=8.4
Red Hat Enterprise Linux Server Update Services for SAP Solutions=8.1
Red Hat Enterprise Linux Server Update Services for SAP Solutions=8.2
Red Hat Enterprise Linux Server Update Services for SAP Solutions=8.4
Red Hat Enterprise Linux Workstation=7.0
Ubuntu Linux=14.04
Ubuntu Linux=16.04
Ubuntu Linux=18.04
Ubuntu Linux=20.04
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=4.1
SUSE Linux Enterprise Desktop=15-sp2
SUSE Linux Enterprise Server=15-sp2
SUSE Linux Enterprise Server=15-sp2
SUSE Linux Workstation Extension=12-sp5
Oracle HTTP Server=12.2.1.3.0
Oracle HTTP Server=12.2.1.4.0
Oracle Storage Cloud Software Appliance=8.8
Siemens Sinumerik Edge<3.3.0
All of
Siemens Scalance LPE9403 Firmware<2.0
Siemens Scalance LPE9403 Firmware
StarWind Command Center=1.0-update3_build5871
StarWind Virtual SAN=v8-build14338
Siemens Scalance LPE9403 Firmware<2.0
Siemens Scalance LPE9403 Firmware
StarWind HyperConverged Appliance

Remedy

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.

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is the severity of CVE-2021-4034?

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

  • 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.

  • 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.

  • 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.

  • 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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203