Skip to content

CVE-2021-4044 Invalid handling of X509_verify_cert() internal errors in libssl

HighCVSS 7.5 EPSS 50.1%
Published
Updated
Exploit status
No public exploit known

Description

Internally libssl in OpenSSL calls X509_verify_cert() on the client side to verify a certificate supplied by a server. That function may return a negative return value to indicate an internal error (for example out of memory). Such a negative return value is mishandled by OpenSSL and will cause an IO function (such as SSL_connect() or SSL_do_handshake()) to not indicate success and a subsequent call to SSL_get_error() to return the value SSL_ERROR_WANT_RETRY_VERIFY. This return value is only supposed to be returned by OpenSSL if the application has previously called SSL_CTX_set_cert_verify_callback(). Since most applications do not do this the SSL_ERROR_WANT_RETRY_VERIFY return value from SSL_get_error() will be totally unexpected and applications may not behave correctly as a result. The exact behaviour will depend on the application but it could result in crashes, infinite loops or other similar incorrect responses. This issue is made more serious in combination with a separate bug in OpenSSL 3.0 that will cause X509_verify_cert() to indicate an internal error when processing a certificate chain. This will occur where a certificate does not include the Subject Alternative Name extension but where a Certificate Authority has enforced name constraints. This issue can occur even with valid chains. By combining the two issues an attacker could induce incorrect, application dependent behaviour. Fixed in OpenSSL 3.0.1 (Affected 3.0.0).

Affected products

ProductAffected versionsFixed in
crates.io openssl-src(crates.io) >= 300.0.0, < 300.0.4 300.0.4
ubuntu/openssl(Ubuntu:22.04) < 3.0.1-0ubuntu1 3.0.1-0ubuntu1
OpenSSL < 1.0.2 1.0.2
OpenSSL = 1.1.0 No fix listed
OpenSSL = 3.0.0 No fix listed
netapp cloud backup All versions No fix listed
netapp e-series performance analyzer All versions No fix listed
netapp ontap select deploy administration utility All versions No fix listed
netapp snapcenter All versions No fix listed
netapp a250 firmware All versions No fix listed
netapp 500f firmware All versions No fix listed
netapp h500s firmware All versions No fix listed
netapp h700s firmware All versions No fix listed
netapp h300e firmware All versions No fix listed
netapp h500e firmware All versions No fix listed
netapp h700e firmware All versions No fix listed
netapp h410s firmware All versions No fix listed
netapp h410c firmware All versions No fix listed
netapp h300s firmware All versions No fix listed
nodejs node.js >= 17.0.0, < 17.3.0 17.3.0
alpine/openssl(Alpine:v3.17) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.18) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.19) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.20) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.21) < 3.0.1-r0 3.0.1-r0
Show 8 more
ProductAffected versionsFixed in
alpine/openssl(Alpine:v3.22) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.23) < 3.0.1-r0 3.0.1-r0
alpine/openssl(Alpine:v3.24) < 3.0.1-r0 3.0.1-r0
alpine/openssl3(Alpine:v3.15) < 3.0.2-r0 3.0.2-r0
alpine/openssl3(Alpine:v3.16) < 3.0.1-r0 3.0.1-r0
OpenSSL = Fixed in OpenSSL 3.0.1 (Affected 3.0.0) No fix listed
ubuntu/openssl(Ubuntu:22.04) = 1.1.1l-1ubuntu1 No fix listed
ubuntu/openssl(Ubuntu:22.04) = 3.0.0-1ubuntu1 No fix listed

References