CVE-2021-23841
JSON

5.9medium

Null pointer deref in X509_issuer_and_serial_hash()

Severity
5.9medium CVSS:3.1 by NVD
Exploit likelihood
7.49% (higher than 94% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
openssl
Also known as
GHSA-84rm-qf37-fgc2RUSTSEC-2021-0058

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

Product or packageVersionsReported by
OpenSSL OpenSSLFixed 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), from 1.0.2 before 1.0.2y, from 1.1.1 before 1.1.1jCVE List, NVD
openssl-src (crates.io)before 111.14.0, from 0.0.0-0 before 111.14.0GitHub Advisory Database, RustSec Advisory Database
debian debian_linux10.0NVD
tenable nessus_network_monitor5.11.0, 5.11.1, 5.12.0, 5.12.1, 5.13.0NVD
tenable tenable.scfrom 5.13.0 up to 5.17.0NVD
apple safaribefore 14.1.1NVD
apple ipadosbefore 14.6NVD
apple iphone_osbefore 14.6NVD
apple macosfrom 11.1 before 11.4NVD
netapp oncommand_insightNot specifiedNVD
netapp oncommand_workflow_automationNot specifiedNVD
netapp snapcenterNot specifiedNVD

All scores

GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
RustSec Advisory Database5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

CWE-190CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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

GitHub Advisory Database

Calls to EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate may overflow the output length argument in some cases where the input length is close to the maximum permissable length for an integer on the platform. In such cases the return value from the function call will be 1 (indicating success), but the output length value will be negative. This could cause applications to behave incorrectly or crash. 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).

RustSec Advisory Database

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.

NVD (es)

La función de la API pública de OpenSSL X509_issuer_and_serial_hash() intenta crear un valor hash único basado en los datos del emisor y del número de serie contenidos en un certificado X509. Sin embargo, no gestiona correctamente los errores que puedan producirse al analizar el campo del emisor (lo que podría ocurrir si el campo del emisor se construye de forma maliciosa). Esto puede dar lugar a un desvío de puntero NULL y a un fallo que conduzca a un posible ataque de denegación de servicio. La función X509_issuer_and_serial_hash() nunca es llamada directamente por OpenSSL, por lo que las aplicaciones sólo son vulnerables si utilizan esta función directamente y lo hacen con certificados que pueden haber sido obtenidos de fuentes no fiables. Las versiones de OpenSSL 1.1.1i y posteriores están afectadas por este problema. Los usuarios de estas versiones deberían actualizar a OpenSSL 1.1.1j. Las versiones de OpenSSL 1.0.2x e inferiores se ven afectadas por este problema. Sin embargo, OpenSSL 1.0.2 está fuera de soporte y ya no recibe actualizaciones públicas. Los clientes con soporte Premium de OpenSSL 1.0.2 deben actualizar a la versión 1.0.2y. Los demás usuarios deben actualizar a la versión 1.1.1j. Corregido en OpenSSL 1.1.1j (Afectado 1.1.1-1.1.1i). Corregido en OpenSSL 1.0.2y (Afectado 1.0.2-1.0.2x)

References

https://www.openssl.org/news/secadv/20210216.txtvendor-advisory, web
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=122a19ab48091c657f7cb1fb3af9fc07bd557bbf
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=8252ee4d90f3f2004d3d0aeeed003ad49c9a7807
https://www.debian.org/security/2021/dsa-4855third-party-advisory, vendor-advisory, web
https://security.gentoo.org/glsa/202103-03third-party-advisory, vendor-advisory, web
http://seclists.org/fulldisclosure/2021/May/70mailing-list, third-party-advisory, web
http://seclists.org/fulldisclosure/2021/May/68mailing-list, third-party-advisory, web
http://seclists.org/fulldisclosure/2021/May/67mailing-list, third-party-advisory, web
https://www.oracle.com/security-alerts/cpuApr2021.htmlpatch, third-party-advisory, web
https://www.tenable.com/security/tns-2021-09third-party-advisory, web
https://security.netapp.com/advisory/ntap-20210513-0002/third-party-advisory
https://security.netapp.com/advisory/ntap-20210219-0009/third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-23841 changed 2024-09-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-84rm-qf37-fgc2 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0058 changed 2023-11-08CC0-1.0
NVDCVE-2021-23841 changed 2026-06-17Public domain