[OpenSSL-1.0.2] CVE-2021-23841 Fix Null pointer deref in X509_issuer_and_serial_hash()

Issue #211 resolved
Takehiko NOZAKI repo owner created an issue

Comments (3)

  1. Takehiko NOZAKI reporter

    BUGFIX: Issue #211 - CVE-2021-23841 Fix Null pointer deref in X509_issuer_and_serial_hash()

    cherry-picked from OpenSSL-1_1_1-stable branch with some modification by me: https://github.com/openssl/openssl/commit/122a19ab48091c657f7cb1fb3af9fc07bd557bbf

    original commit message:

    Fix Null pointer deref in X509_issuer_and_serial_hash()

    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.

    CVE-2021-23841

    Reviewed-by: Richard Levitte levitte@openssl.org Reviewed-by: Paul Dale pauli@openssl.org (cherry picked from commit 8130d654d1de922ea224fa18ee3bc7262edc39c0)

    → <<cset 97f0ecd843e7>>

  2. Log in to comment