CVE-2022-4450Double free after calling PEM_read_bio_ex
The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload data. If the function succeeds then the "name_out", "header" and "data" arguments are populated with pointers to buffers containing the relevant decoded data. The caller is responsible for freeing those buffers. It is possible to construct a PEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex() will return a failure code but will populate the header argument with a pointer to a buffer that has already been freed. If the caller also frees this buffer then a double free will occur. This will most likely lead to a crash. This could be exploited by an attacker who has the ability to supply malicious PEM files for parsing to achieve a denial of service attack. The functions PEM_read_bio() and PEM_read() are simple wrappers around PEM_read_bio_ex() and therefore these functions are also directly affected. These functions are also called indirectly by a number of other OpenSSL functions including PEM_X509_INFO_read_bio_ex() and SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal uses of these functions are not vulnerable because the caller does not free the header argument if PEM_read_bio_ex() returns a failure code. These locations include the PEM_read_bio_TYPE() functions as well as the decoders introduced in OpenSSL 3.0. The OpenSSL asn1parse command line application is also impacted by this issue.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, 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 26.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | edk2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | edk2 | Fixed | 2022.02-3ubuntu0.22.04.4 | UBUNTU-CVE-2022-4450 |
| Ubuntu 22.04 | nodejs | Fixed | 12.22.9~dfsg-1ubuntu3.3 | UBUNTU-CVE-2022-4450 |
| Ubuntu 22.04 | openssl | Fixed | 3.0.2-0ubuntu1.8 | UBUNTU-CVE-2022-4450 |
| Ubuntu 20.04 | edk2 | Fix pending | UBUNTU-CVE-2022-4450 | |
| Ubuntu 20.04 | openssl | Fixed | 1.1.1f-1ubuntu2.17 | UBUNTU-CVE-2022-4450 |
| Ubuntu 18.04 | edk2 | Fix pending | UBUNTU-CVE-2022-4450 | |
| Ubuntu 18.04 | openssl | Fixed | 1.1.1-1ubuntu2.1~18.04.21 | UBUNTU-CVE-2022-4450 |
| Ubuntu 16.04 | edk2 | Fix pending | UBUNTU-CVE-2022-4450 | |
| Ubuntu 16.04 | nodejs | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | openssl | Fix pending | ||
| Ubuntu 14.04 | edk2 | Fix pending | ||
| Debian 14 | openssl | Fixed | 3.0.8-1 | DEBIAN-CVE-2022-4450 |
| Debian 13 | openssl | Fixed | 3.0.8-1 | DEBIAN-CVE-2022-4450 |
| Debian 12 | openssl | Fixed | 3.0.8-1 | DEBIAN-CVE-2022-4450 |
| Red Hat Enterprise Linux 9 | compat-openssl11 | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | edk2 | Fixed | 0:20221207gitfff6d81270b5-9.el9_2 | RHSA-2023:2165 |
| Red Hat Enterprise Linux 9 | edk2-aarch64 | Fixed | 0:20221207gitfff6d81270b5-9.el9_2 | RHSA-2023:2165 |
| Red Hat Enterprise Linux 9 | edk2-ovmf | Fixed | 0:20221207gitfff6d81270b5-9.el9_2 | RHSA-2023:2165 |
| Red Hat Enterprise Linux 9 | edk2-tools | Fixed | 0:20221207gitfff6d81270b5-9.el9_2 | RHSA-2023:2165 |
| Red Hat Enterprise Linux 9 | edk2-tools-doc | Fixed | 0:20221207gitfff6d81270b5-9.el9_2 | RHSA-2023:2165 |
| Red Hat Enterprise Linux 9 | openssl | Fixed | 1:3.0.1-47.el9_1 | RHSA-2023:0946 |
| Red Hat Enterprise Linux 9 | openssl-devel | Fixed | 1:3.0.1-47.el9_1 | RHSA-2023:0946 |
| Red Hat Enterprise Linux 9 | openssl-libs | Fixed | 1:3.0.1-47.el9_1 | RHSA-2023:0946 |
| Red Hat Enterprise Linux 9 | openssl-perl | Fixed | 1:3.0.1-47.el9_1 | RHSA-2023:0946 |
| Red Hat Enterprise Linux 9 | shim | Not affected | ||
| Red Hat Enterprise Linux 9 | shim-aa64 | Not affected | ||
| Red Hat Enterprise Linux 9 | shim-x64 | Not affected | ||
| Red Hat Enterprise Linux 8 | compat-openssl10 | Not affected | ||
| Red Hat Enterprise Linux 8 | edk2 | Fixed | 0:20220126gitbb1bba3d77-4.el8 | RHSA-2023:2932 |
| Red Hat Enterprise Linux 8 | edk2-aarch64 | Fixed | 0:20220126gitbb1bba3d77-4.el8 | RHSA-2023:2932 |
| Red Hat Enterprise Linux 8 | edk2-ovmf | Fixed | 0:20220126gitbb1bba3d77-4.el8 | RHSA-2023:2932 |
| Red Hat Enterprise Linux 8 | openssl | Fixed | 1:1.1.1k-9.el8_7 | RHSA-2023:1405 |
| Red Hat Enterprise Linux 8 | openssl-devel | Fixed | 1:1.1.1k-9.el8_7 | RHSA-2023:1405 |
| Red Hat Enterprise Linux 8 | openssl-libs | Fixed | 1:1.1.1k-9.el8_7 | RHSA-2023:1405 |
| Red Hat Enterprise Linux 8 | openssl-perl | Fixed | 1:1.1.1k-9.el8_7 | RHSA-2023:1405 |
| Red Hat Enterprise Linux 8 | shim | Not affected | ||
| Red Hat Enterprise Linux 8 | shim-aa64 | Not affected | ||
| Red Hat Enterprise Linux 8 | shim-ia32 | Not affected | ||
| Red Hat Enterprise Linux 8 | shim-x64 | Not affected | ||
| Red Hat Enterprise Linux 7 | AAVMF | Not affected | ||
| Red Hat Enterprise Linux 7 | OVMF | 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 | ovmf | 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 | ||
| AlmaLinux 9 | edk2-aarch64 | Fixed | 20221207gitfff6d81270b5-9.el9_2 | ALSA-2023:2165 |
| AlmaLinux 9 | edk2-ovmf | Fixed | 20221207gitfff6d81270b5-9.el9_2 | ALSA-2023:2165 |
| AlmaLinux 9 | edk2-tools | Fixed | 20221207gitfff6d81270b5-9.el9_2 | ALSA-2023:2165 |
| AlmaLinux 9 | edk2-tools-doc | Fixed | 20221207gitfff6d81270b5-9.el9_2 | ALSA-2023:2165 |
| AlmaLinux 9 | openssl | Fixed | 1:3.0.1-47.el9_1 | ALSA-2023:0946 |
| AlmaLinux 9 | openssl-devel | Fixed | 1:3.0.1-47.el9_1 | ALSA-2023:0946 |
| AlmaLinux 9 | openssl-libs | Fixed | 1:3.0.1-47.el9_1 | ALSA-2023:0946 |
| AlmaLinux 9 | openssl-perl | Fixed | 1:3.0.1-47.el9_1 | ALSA-2023:0946 |
| AlmaLinux 8 | edk2-aarch64 | Fixed | 20220126gitbb1bba3d77-4.el8 | ALSA-2023:2932 |
| AlmaLinux 8 | edk2-ovmf | Fixed | 20220126gitbb1bba3d77-4.el8 | ALSA-2023:2932 |
| AlmaLinux 8 | openssl | Fixed | 1:1.1.1k-9.el8_7 | ALSA-2023:1405 |
| AlmaLinux 8 | openssl-devel | Fixed | 1:1.1.1k-9.el8_7 | ALSA-2023:1405 |
| AlmaLinux 8 | openssl-libs | Fixed | 1:1.1.1k-9.el8_7 | ALSA-2023:1405 |
| AlmaLinux 8 | openssl-perl | Fixed | 1:1.1.1k-9.el8_7 | ALSA-2023:1405 |
| Rocky Linux 9 | openssl | Fixed | 1:3.0.1-47.el9_1 | RLSA-2023:0946 |
| Rocky Linux 8 | openssl | Fixed | 1:1.1.1k-9.el8_7 | RLSA-2023:1405 |
| Alpine Linux 3.24 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.23 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.22 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.21 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.20 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.19 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.18 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.18 | openssl1.1-compat | Fixed | 1.1.1t-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.17 | openssl | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.17 | openssl1.1-compat | Fixed | 1.1.1t-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.16 | openssl | Fixed | 1.1.1t-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.16 | openssl3 | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.15 | openssl | Fixed | 1.1.1t-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.15 | openssl3 | Fixed | 3.0.8-r0 | ALPINE-CVE-2022-4450 |
| Alpine Linux 3.14 | openssl | Fixed | 1.1.1t-r0 | ALPINE-CVE-2022-4450 |
| crates.io library | openssl-src | Fixed | 300.0.12 | GHSA-v5w6-wcm8-jm4q |
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: 3.0.0 to before 3.0.8, 1.1.1 to before 1.1.1t; fixed in
3.0.8,1.1.1t
Vendor advisories:
- https://www.openssl.org/news/secadv/20230207.txt (vendor-advisory)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f… (patch)
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbdd… (patch)
References
- https://www.openssl.org/news/secadv/20230207.txt
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b
- https://security.gentoo.org/glsa/202402-08
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.