CVE-2023-0401: NULL dereference during PKCS7 data verification
A NULL pointer can be dereferenced when signatures are being verified on PKCS7 signed or signedAndEnveloped data. In case the hash algorithm used for the signature is known to the OpenSSL library but the implementation of the hash algorithm is not available the digest initialization will fail. There is a missing check for the return value from the initialization function which later leads to invalid usage of the digest API most likely leading to a crash. The unavailability of an algorithm can be caused by using FIPS enabled configuration of providers or more commonly by not loading the legacy provider.
PKCS7 data is processed by the SMIME library calls and also by the time stamp (TS) library calls. The TLS implementation in OpenSSL does not call these functions however third party applications would be affected if they call these functions to verify signatures on untrusted data.
Other sources
A NULL pointer can be dereferenced when signatures are being verified on PKCS7 signed or signedAndEnveloped data. In case the hash algorithm used for the signature is known to the OpenSSL library but the implementation of the hash algorithm is not available the digest initialization will fail. There is a missing check for the return value from the initialization function which later leads to invalid usage of the digest API most likely leading to a crash.
The unavailability of an algorithm can be caused by using FIPS enabled configuration of providers or more commonly by not loading the legacy provider.
PKCS7 data is processed by the SMIME library calls and also by the time stamp (TS) library calls. The TLS implementation in OpenSSL does not call these functions however third party applications would be affected if they call these functions to verify signatures on untrusted data.
— NVD
A NULL pointer vulnerability was found in OpenSSL, which can be dereferenced when signatures are being verified on PKCS7 signed or signedAndEnveloped data. In case the hash algorithm used for the signature is known to the OpenSSL library but the implementation of the hash algorithm is not available, the digest initialization will fail. There is a missing check for the return value from the initialization function which later leads to invalid usage of the digest API, most likely leading to a crash.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1:3.0.1-47.el9_1 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1:3.0.1-46.el9_0 - Upgrade
Upgrade
rust/openssl-srcto a version that resolves this vulnerability.Fixed in 300.0.12 - Upgrade
Upgrade
debian/opensslto a version that resolves this vulnerability.Fixed in 1.1.1w-0+deb11u1Fixed in 1.1.1n-0+deb11u5Fixed in 3.0.14-1~deb12u1Fixed in 3.0.14-1~deb12u2Fixed in 3.3.2-1
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2023-0401.
What is the title of the vulnerability?
The title of the vulnerability is 'A NULL pointer vulnerability in OpenSSL'.
What is the severity of CVE-2023-0401?
The severity of CVE-2023-0401 is high with a severity value of 7.
Which software is affected by CVE-2023-0401?
The software affected by CVE-2023-0401 includes OpenSSL version 1:3.0.1-47.el9_1 and 1:3.0.1-46.el9_0, as well as Stormshield Management Center up to version 3.3.3.
How can this vulnerability be exploited?
This vulnerability can be exploited through dereferencing a NULL pointer during the verification of signatures on PKCS7 signed or signedAndEnveloped data.