CVE-2021-23841
openssl: NULL pointer dereference in X509_issuer_and_serial_hash()
Overview
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).
Source: OX vulnerability database
Severity
5.9 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-476
Affected packages · 4
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Cargo (Rust) | openssl-src | <111.14.0 | 111.14.0 |
| Conan (C/C++) | openssl | >=1.0.2 <1.0.2y||>=1.1.1 <1.1.1j | 1.1.0l1.1.1p |
| Julia | Openresty_jll | <1.19.9+0 | 1.19.9+0 |
| Julia | OpenSSL_jll | <1.1.10+0 | 1.1.10+0 |
Open a package to see all its vulnerabilities.
Operating systems · 83 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | shim-unsigned-aarch64 +1 | 0:15.8-5.azl3 |
Oracle Linux 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | openssl +4 | 10:1.0.2k-22.el7_9_fips |
| 7 | openssl +4 | 1:1.0.2k-22.el7_9 |
| 7 | openssl +4 | 2:1.0.2k-22.ksplice1.el7_9 |
| 8 | openssl +3 | 1:1.1.1k-4.el8 |
| 8 | openssl +5 | 2:1.1.1k-4.ksplice1.el8 |
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | openssl +4 | 1.1.1k-1.ph4 |
Red Hat 2 releases · 21 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | aavmf +2 | wont fix | — |
| 7 | jbcs-httpd24-openssl-pkcs11 | 0:0.4.10-22.jbcs.el7 | RHSA-2021:4614 |
| 7 | jbcs-httpd24-openssl-chil | 0:1.0.0-7.jbcs.el7 | RHSA-2021:4614 |
| 7 | jws5-tomcat-vault +1 | 0:1.1.8-4.Final_redhat_00004.1.el7jws | RHSA-2021:4861 |
| 7 | jbcs-httpd24-mod-http2 | 0:1.15.7-21.jbcs.el7 | RHSA-2021:4614 |
| 7 | jws5-tomcat-native | 0:1.2.30-3.redhat_3.el7jws | RHSA-2021:4861 |
33 more rows
SUSE Linux Enterprise 1 release · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | libopenssl0-9-8 | 0.9.8j-106.24.1 | SUSE-SU-2021:0793-1 |
| 12.5 | libopenssl-1-0-0-devel +6 | 1.0.2p-3.36.1 | SUSE-SU-2021:0725-1 |
| 12.5 | libopenssl-1-1-devel +4 | 1.1.1d-2.30.1 | SUSE-SU-2021:0752-1 |
SUSE Linux Enterprise Micro 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.0 | libopenssl1-1 +1 | 1.1.1d-11.17.1 | SUSE-SU-2021:0754-1 |
alma 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | edk2-ovmf | 20210527gite1999b264f1f-3.el8 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | openssl | 1.1.1j-r0 |
| 3.23 | openssl | 1.1.1j-r0 |
| 3.24 | openssl | 1.1.1j-r0 |
| edge | openssl | 1.1.1j-r0 |
debian 6 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 10 | openssl | 1.1.1d-0+deb10u5 |
| 11 | openssl | 1.1.1j-1 |
| 12 | openssl | 1.1.1j-1 |
| 13 | openssl | 1.1.1j-1 |
| 14 | openssl | 1.1.1j-1 |
| 9 | openssl1-0 | 1.0.2u-1~deb9u4 |
1 more row
echo 1 release · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| openssl-1-0-1g | 1.0.1g+e1 | |
| openssl-1-1-1c | 1.1.1c+e1 | |
| openssl-1-1-1g | 1.1.1g+e1 | |
| openssl | 1.1.1j-1 |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | libopenssl-1-0-0-devel +11 | 1.0.2u-6.2 | openSUSE-SU-2024:11126-1 |
| Tumbleweed | libopenssl-1-1-devel +6 | 1.1.1l-1.2 | openSUSE-SU-2024:11127-1 |
rocky 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | openssl +3 | 1:1.1.1k-4.el8 |
| 8 | edk2-aarch64 +1 | 20210527gite1999b264f1f-3.el8 |
root.io alpine 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.23 | rootio-openssl | 1.1.1j-r0 |
root.io debian 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-openssl | 1.1.1j-1 |
| 12 | rootio-openssl | 1.1.1j-1 |
seal Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | openssl +1 | 1:1.0.2k-25.el7_9+sp999 |
| 7 | openssl +1 | 1:1.0.2k-26.el7_9+sp999 |
| 8 | openssl +1 | 1:1.1.1k-14.el8_6+sp999 |
| 9 | openssl +1 | 1:3.2.2-6.el9_5+sp999 |
ubuntu 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | openssl1-0 | 1.0.2n-1ubuntu5.6 |
| 18.04 | openssl | 1.1.1-1ubuntu2.1~18.04.8 |
| 18.04-ESM | openssl1-0 | 1.0.2n-1ubuntu5.6 |
| 18.04-ESM | openssl | 1.1.1-1ubuntu2.1~18.04.8 |
| 20.04 | openssl | 1.1.1f-1ubuntu2.2 |
| 20.04-ESM | openssl | 1.1.1f-1ubuntu2.2 |
References
- seclists.org http://seclists.org/fulldisclosure/2021/May/67
- seclists.org http://seclists.org/fulldisclosure/2021/May/68
- seclists.org http://seclists.org/fulldisclosure/2021/May/70
- access.redhat.com https://access.redhat.com/errata/RHSA-2021:4424
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-23841
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1908036
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1930310
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1930324
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1934534
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1934600
Show all 52 references
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1939637
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1940085
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1965362
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/pdf/ssa-637483.pdf
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23840
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23841
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2021:4424
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=122a19ab48091c657f7cb1fb3af9fc07bd557bbf
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=8252ee4d90f3f2004d3d0aeeed003ad49c9a7807
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=122a19ab48091c657f7cb1fb3af9fc07bd557bbf
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=6a51b9e1d0cf0bf8515f7201b68fb0a3482b3dc1
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=8252ee4d90f3f2004d3d0aeeed003ad49c9a7807
- git.openssl.org https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=9b1129239f3ebb1d1c98ce9ed41d5c9476c47cb2
- github.com https://github.com/advisories/GHSA-84rm-qf37-fgc2
- github.com https://github.com/alexcrichton/openssl-src-rs
- kb.pulsesecure.net https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44846
- linux.oracle.com https://linux.oracle.com/cve/CVE-2021-23841.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2021-9561.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-23841
- rustsec.org https://rustsec.org/advisories/RUSTSEC-2021-0058
- rustsec.org https://rustsec.org/advisories/RUSTSEC-2021-0058.html
- security.gentoo.org https://security.gentoo.org/glsa/202103-03
- security.netapp.com https://security.netapp.com/advisory/ntap-20210219-0009
- security.netapp.com https://security.netapp.com/advisory/ntap-20210219-0009/
- security.netapp.com https://security.netapp.com/advisory/ntap-20210513-0002
- security.netapp.com https://security.netapp.com/advisory/ntap-20210513-0002/
- security.netapp.com https://security.netapp.com/advisory/ntap-20240621-0006/
- support.apple.com https://support.apple.com/kb/HT212528
- support.apple.com https://support.apple.com/kb/HT212529
- support.apple.com https://support.apple.com/kb/HT212534
- ubuntu.com https://ubuntu.com/security/notices/USN-4738-1
- ubuntu.com https://ubuntu.com/security/notices/USN-4745-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-23841
- www.debian.org https://www.debian.org/security/2021/dsa-4855
- www.openssl.org https://www.openssl.org/news/secadv/20210216.txt
- www.oracle.com https://www.oracle.com//security-alerts/cpujul2021.html
- www.oracle.com https://www.oracle.com/security-alerts/cpuApr2021.html
- www.oracle.com https://www.oracle.com/security-alerts/cpuapr2022.html
- www.oracle.com https://www.oracle.com/security-alerts/cpuoct2021.html
- www.tenable.com https://www.tenable.com/security/tns-2021-03
- www.tenable.com https://www.tenable.com/security/tns-2021-09
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.