CVE-2023-0215
Use-after-free following BIO_new_NDEF
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
The public API function BIO_new_NDEF is a helper function used for streaming
ASN.1 data via a BIO. It is primarily used internally to OpenSSL to support the
SMIME, CMS and PKCS7 streaming capabilities, but may also be called directly by
end user applications.
The function receives a BIO from the caller, prepends a new BIO_f_asn1 filter
BIO onto the front of it to form a BIO chain, and then returns the new head of
the BIO chain to the caller. Under certain conditions, for example if a CMS
recipient public key is invalid, the new filter BIO is freed and the function
returns a NULL result indicating a failure. However, in this case, the BIO chain
is not properly cleaned up and the BIO passed by the caller still retains
internal pointers to the previously freed filter BIO. If the caller then goes on
to call BIO_pop() on the BIO then a use-after-free will occur. This will most
likely result in a crash.
This scenario occurs directly in the internal function B64_write_ASN1() which
may cause BIO_new_NDEF() to be called and will subsequently call BIO_pop() on
the BIO. This internal function is in turn called by the public API functions
PEM_write_bio_ASN1_stream, PEM_write_bio_CMS_stream, PEM_write_bio_PKCS7_stream,
SMIME_write_ASN1, SMIME_write_CMS and SMIME_write_PKCS7.
Other public API functions that may be impacted by this include
i2d_ASN1_bio_stream, BIO_new_CMS, BIO_new_PKCS7, i2d_CMS_bio_stream and
i2d_PKCS7_bio_stream.
The OpenSSL cms and smime command line applications are similarly affected.
A use-after-free vulnerability was found in OpenSSL's BIO_new_NDEF function. The public API function BIO_new_NDEF is a helper function used for streaming ASN.1 data via a BIO. It is primarily used internally by OpenSSL to support the SMIME, CMS, and PKCS7 streaming capabilities, but it may also be called directly by end-user applications. The function receives a BIO from the caller, prepends a new BIO_f_asn1 filter BIO onto the front of it to form a BIO chain, and then returns the new head of the BIO chain to the caller. Under certain conditions. For example, if a CMS recipient public key is invalid, the new filter BIO is freed, and the function returns a NULL result indicating a failure. However, in this case, the BIO chain is not properly cleaned up, and the BIO passed by the caller still retains internal pointers to the previously freed filter BIO. If the caller then calls BIO_pop() on the BIO, a use-after-free will occur, possibly resulting in a crash.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2023-01-11 CVE Reserved
- 2023-02-07 CVE Published
- 2024-08-02 CVE Updated
- 2024-09-29 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-416: Use After Free
CAPEC
References (10)
URL | Tag | Source |
---|---|---|
https://security.gentoo.org/glsa/202402-08 | ||
https://security.netapp.com/advisory/ntap-20230427-0007 | Third Party Advisory | |
https://security.netapp.com/advisory/ntap-20230427-0009 | Third Party Advisory | |
https://security.netapp.com/advisory/ntap-20240621-0006 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://www.openssl.org/news/secadv/20230207.txt | 2024-06-21 | |
https://access.redhat.com/security/cve/CVE-2023-0215 | 2023-07-18 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2164492 | 2023-07-18 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Openssl Search vendor "Openssl" | Openssl Search vendor "Openssl" for product "Openssl" | >= 1.0.2 < 1.0.2zg Search vendor "Openssl" for product "Openssl" and version " >= 1.0.2 < 1.0.2zg" | - |
Affected
| ||||||
Openssl Search vendor "Openssl" | Openssl Search vendor "Openssl" for product "Openssl" | >= 1.1.1 < 1.1.1t Search vendor "Openssl" for product "Openssl" and version " >= 1.1.1 < 1.1.1t" | - |
Affected
| ||||||
Openssl Search vendor "Openssl" | Openssl Search vendor "Openssl" for product "Openssl" | >= 3.0.0 < 3.0.8 Search vendor "Openssl" for product "Openssl" and version " >= 3.0.0 < 3.0.8" | - |
Affected
| ||||||
Stormshield Search vendor "Stormshield" | Stormshield Management Center Search vendor "Stormshield" for product "Stormshield Management Center" | < 3.3.3 Search vendor "Stormshield" for product "Stormshield Management Center" and version " < 3.3.3" | - |
Affected
|