Skip to content
OpenAdvisories
Medium · 5.9 Public exploit CVE-2021-23841 EUVD-2021-1630GHSA-84rm-qf37-fgc2RUSTSEC-2021-0058

Null pointer deref in X509_issuer_and_serial_hash()

Published Feb 16, 2021 · Updated Sep 16, 2024 · Assigned by openssl

Description

The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the issuer field (which might occur if the issuer field is maliciously constructed). This may subsequently result in a NULL pointer deref and a crash leading to a potential denial of service attack. The function X509_issuer_and_serial_hash() is never directly called by OpenSSL itself so applications are only vulnerable if they use this function directly and they use it on certificates that may have been obtained from untrusted sources. OpenSSL versions 1.1.1i and below are affected by this issue. Users of these versions should upgrade to OpenSSL 1.1.1j. OpenSSL versions 1.0.2x and below are affected by this issue. However OpenSSL 1.0.2 is out of support and no longer receiving public updates. Premium support customers of OpenSSL 1.0.2 should upgrade to 1.0.2y. Other users should upgrade to 1.1.1j. Fixed in OpenSSL 1.1.1j (Affected 1.1.1-1.1.1i). Fixed in OpenSSL 1.0.2y (Affected 1.0.2-1.0.2x).

Affected products

VendorProductAffectedFixed
OpenSSL OpenSSL Fixed in OpenSSL 1.1.1j (Affected 1.1.1-1.1.1i), Fixed in OpenSSL 1.0.2y (Affected 1.0.2-1.0.2x) —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 openssl 1.1.1j-1 —
Debian 13 openssl 1.1.1j-1 —
Debian 12 openssl 1.1.1j-1 —
Debian 10 openssl 1.1.1d-0+deb10u5 DSA-4855-1
Debian 9 openssl 1.1.0l-1~deb9u3 DLA-2563-1
Debian 9 openssl1.0 1.0.2u-1~deb9u4 DLA-2565-1
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS openssl 1.1.1f-1ubuntu2.2 USN-4738-1
Ubuntu 18.04 LTS openssl 1.1.1-1ubuntu2.1~18.04.8 USN-4738-1
Ubuntu 18.04 LTS openssl1.0 1.0.2n-1ubuntu5.6 USN-4738-1
Ubuntu 16.04 LTS openssl 1.0.2g-1ubuntu4.19 USN-4738-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 14.04 LTS openssl 1.0.1f-1ubuntu2.27+esm2 USN-4745-1
ReleasePackageFixed inAdvisory
RHEL 8 edk2 +2 20210527gite1999b264f1f-3.el8 RHSA-2021:4198
RHEL 8 openssl +3 1:1.1.1k-4.el8 RHSA-2021:4424
RHEL 7 openssl +4 1:1.0.2k-22.el7_9 RHSA-2021:3798
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat JBoss Web Server 5 jws5-tomcat +11 9.0.50-3.redhat_00004.1.el7jws RHSA-2021:4861
Red Hat JBoss Web Server 5 jws5-tomcat-native 1.2.30-3.redhat_3.el7jws RHSA-2021:4861
Red Hat JBoss Web Server 5 jws5-tomcat-vault +1 1.1.8-4.Final_redhat_00004.1.el7jws RHSA-2021:4861
Red Hat JBoss Core Services 1 jbcs-httpd24-apr +1 1.6.3-107.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-apr-util +8 1.6.1-84.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-curl +2 7.78.0-2.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-httpd +6 2.4.37-78.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_cluster-native 1.3.16-9.Final_redhat_2.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_http2 1.15.7-21.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_jk +2 1.2.48-20.redhat_1.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_md 1:2.0.8-40.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_security 2.9.2-67.GA.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_ssl +1 1:2.4.37-78.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-nghttp2 +1 1.39.2-39.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-openssl +4 1:1.1.1g-8.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-openssl-chil 1.0.0-7.el8jbcs RHSA-2021:4614
Red Hat JBoss Core Services 1 jbcs-httpd24-openssl-pkcs11 0.4.10-22.el8jbcs RHSA-2021:4614

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 edk2-ovmf 20210527gite1999b264f1f-3.el8 ALSA-2021:4198

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 edk2 20210527gite1999b264f1f-3.el8 RLSA-2021:4198
Rocky Linux 8 openssl 1:1.1.1k-4.el8 RLSA-2021:4424
ReleasePackageFixed inAdvisory
SLES 15 SP2 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SLES 15 SP2 openssl-1_1 1.1.1d-11.17.1 SUSE-SU-2021:0754-1
SLES 15 SP1 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SLES 15 SP1 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SLES 15 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SLES 15 openssl-1_1 1.1.0i-4.57.1 SUSE-SU-2021:0755-1
SLES 12 SP5 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SLES 12 SP5 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
SLES 12 SP4 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SLES 12 SP4 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
Show 25 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP3 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SLES 12 SP2 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SLES 12 compat-openssl098 0.9.8j-106.24.1 SUSE-SU-2021:0793-1
SLES 11 SP4 openssl 0.9.8j-0.106.37.1 SUSE-SU-2021:14670-1
SLES 11 openssl1 1.0.1g-0.58.33.1 SUSE-SU-2021:14667-1
SLES for SAP 15 SP1 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SLES for SAP 15 SP1 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SLES for SAP 15 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SLES for SAP 15 openssl-1_1 1.1.0i-4.57.1 SUSE-SU-2021:0755-1
SLES for SAP 12 SP5 compat-openssl098 0.9.8j-106.24.1 SUSE-SU-2021:0793-1
SLES for SAP 12 SP5 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SLES for SAP 12 SP5 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
SLES for SAP 12 SP4 compat-openssl098 0.9.8j-106.24.1 SUSE-SU-2021:0793-1
SLES for SAP 12 SP4 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SLES for SAP 12 SP4 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
SLES for SAP 12 SP3 compat-openssl098 0.9.8j-106.24.1 SUSE-SU-2021:0793-1
SLES for SAP 12 SP3 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SLES for SAP 12 SP2 compat-openssl098 0.9.8j-106.24.1 SUSE-SU-2021:0793-1
SLES for SAP 12 SP2 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SLE Micro 5.0 openssl-1_1 1.1.1d-11.17.1 SUSE-SU-2021:0754-1
SLE HPC 15 SP1 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SLE HPC 15 openssl-1_1 1.1.0i-4.57.1 SUSE-SU-2021:0755-1
SUSE OpenStack Cloud Crowbar 9 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SUSE OpenStack Cloud Crowbar 9 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
SUSE OpenStack Cloud Crowbar 8 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SUSE OpenStack Cloud 9 openssl-1_0_0 1.0.2p-3.36.1 SUSE-SU-2021:0725-1
SUSE OpenStack Cloud 9 openssl-1_1 1.1.1d-2.30.1 SUSE-SU-2021:0752-1
SUSE OpenStack Cloud 8 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SUSE OpenStack Cloud 7 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SUSE Manager Server 4.0 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SUSE Manager Server 4.0 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SUSE Manager Retail Branch Server 4.0 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SUSE Manager Retail Branch Server 4.0 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SUSE Manager Proxy 4.0 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SUSE Manager Proxy 4.0 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
SUSE Linux Enterprise Point of Sale 11 SP3 openssl 0.9.8j-0.106.37.1 SUSE-SU-2021:14670-1
SUSE HPE Helion OpenStack 8 openssl 1.0.2j-60.66.1 SUSE-SU-2021:0939-1
SUSE Enterprise Storage 6 openssl-1_0_0 1.0.2p-3.37.1 SUSE-SU-2021:0769-1
SUSE Enterprise Storage 6 openssl-1_1 1.1.0i-14.15.1 SUSE-SU-2021:0753-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed openssl-1_0_0 1.0.2u-6.2 openSUSE-SU-2024:11126-1
openSUSE Tumbleweed openssl-1_1 1.1.1l-1.2 openSUSE-SU-2024:11127-1
openSUSE Leap 15.2 openssl-1_0_0 1.0.2p-lp152.8.12.1 openSUSE-SU-2021:0430-1
openSUSE Leap 15.2 openssl-1_1 1.1.1d-lp152.7.12.1 openSUSE-SU-2021:0427-1
ReleasePackageFixed inAdvisory
Alpine v3.24 openssl 1.1.1j-r0 —
Alpine v3.23 openssl 1.1.1j-r0 —
Alpine v3.22 openssl 1.1.1j-r0 —
Alpine v3.21 openssl 1.1.1j-r0 —
Alpine v3.20 openssl 1.1.1j-r0 —
Show 11 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 openssl 1.1.1j-r0 —
Alpine v3.18 openssl +1 1.1.1j-r0 —
Alpine v3.17 openssl +1 1.1.1j-r0 —
Alpine v3.16 openssl +1 1.1.1j-r0 —
Alpine v3.15 openssl +1 1.1.1j-r0 —
Alpine v3.14 openssl 1.1.1j-r0 —
Alpine v3.13 openssl 1.1.1j-r0 —
Alpine v3.12 openssl 1.1.1j-r0 —
Alpine v3.11 openssl 1.1.1j-r0 —
Alpine v3.10 openssl 1.1.1j-r0 —
Alpine v3.9 openssl 1.1.1j-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 edk2-ovmf +4 20200801stable-1.amzn2.0.5 ALAS2-2024-2502
Amazon Linux 2 openssl +4 1:1.0.2k-19.amzn2.0.6 ALAS2-2021-1608
Amazon Linux 2 openssl11 +3 1:1.1.1g-12.amzn2.0.2 ALAS2-2021-1612

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 shim-unsigned-x64 +1 15.8-5 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 openssl +3 1:1.1.1k-4.el8 ELSA-2021-4424
Oracle Linux 7 openssl +4 1:1.0.2k-22.el7_9 ELSA-2021-9528, ELSA-2021-3798

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io openssl-src < 111.14.0 111.14.0 GHSA-84rm-qf37-fgc2
crates.io openssl-src >= 0.0.0-0, < 111.14.0 111.14.0 RUSTSEC-2021-0058

Advisories 43

References