CVE-2021-4044Invalid handling of X509_verify_cert() internal errors in libssl
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).
What to do
Likely to be exploited: EPSS gives a 50% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Ubuntu, crates.io: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | openssl | Fixed | 3.0.1-0ubuntu1 | UBUNTU-CVE-2021-4044 |
| Ubuntu 16.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | openssl | Not affected vulnerable_code_not_present | ||
| Ubuntu 14.04 | edk2 | Fix pending | ||
| Red Hat Enterprise Linux 9 | openssl | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 8 | compat-openssl10 | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl-static | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl-static | Not affected | ||
| Red Hat Enterprise Linux 7 | openssl098e | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-perl | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl-static | Not affected | ||
| Red Hat Enterprise Linux 6 | openssl098e | Not affected | ||
| Alpine Linux 3.24 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.23 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.22 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.21 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.20 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.19 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.18 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.17 | openssl | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.16 | openssl3 | Fixed | 3.0.1-r0 | ALPINE-CVE-2021-4044 |
| Alpine Linux 3.15 | openssl3 | Fixed | 3.0.2-r0 | ALPINE-CVE-2021-4044 |
| crates.io library | openssl-src | Fixed | 300.0.4 | RUSTSEC-2021-0129 |
What the vendor says
As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- OpenSSL: affected: Fixed in OpenSSL 3.0.1 (Affected 3.0.0)
References
- https://www.openssl.org/news/secadv/20211214.txt
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=758754966791c537ea95241438454aa86f91f256
- https://security.netapp.com/advisory/ntap-20211229-0003/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.