Skip to content
OpenAdvisories

Description

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.

Affected products

VendorProductAffectedFixed
OpenSSL OpenSSL 3.0.0 – < 3.0.8, 1.1.1 – < 1.1.1t 3.0.8

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 openssl 3.0.8-1 —
Debian 13 openssl 3.0.8-1 —
Debian 12 openssl 3.0.8-1 —
Debian 11 openssl 1.1.1n-0+deb11u4 DSA-5343-1
Debian 10 openssl 1.1.1n-0+deb10u4 DLA-3325-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS edk2 2024.02-2ubuntu0.6 USN-7894-1
Ubuntu 22.04 LTS edk2 2022.02-3ubuntu0.22.04.4 USN-7894-1
Ubuntu 22.04 LTS nodejs 12.22.9~dfsg-1ubuntu3.3 USN-6564-1
Ubuntu 22.04 LTS openssl 3.0.2-0ubuntu1.8 USN-5844-1
Ubuntu 20.04 LTS openssl 1.1.1f-1ubuntu2.17 USN-5844-1
Ubuntu 18.04 LTS openssl 1.1.1-1ubuntu2.1~18.04.21 USN-5844-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro FIPS 20.04 LTS openssl No fix yet —
Ubuntu Pro FIPS 18.04 LTS openssl No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS openssl 1.1.1f-1ubuntu2.fips.17 —
Ubuntu Pro FIPS-updates 18.04 LTS openssl 1.1.1-1ubuntu2.fips.2.1~18.04.21 —
Ubuntu Pro 20.04 LTS edk2 No fix yet —
Ubuntu Pro 18.04 LTS edk2 No fix yet —
Ubuntu Pro 16.04 LTS edk2 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 edk2 +4 20221207gitfff6d81270b5-9.el9_2 RHSA-2023:2165
RHEL 9 openssl +3 1:3.0.1-47.el9_1 RHSA-2023:0946
RHEL 8 edk2 +2 20220126gitbb1bba3d77-4.el8 RHSA-2023:2932
RHEL 8 openssl +3 1:1.1.1k-9.el8_7 RHSA-2023:1405
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.0 EUS openssl +3 1:3.0.1-46.el9_0 RHSA-2023:1199
RHEL 8.6 EUS openssl +3 1:1.1.1k-9.el8_6 RHSA-2023:3408
Red Hat JBoss Web Server 5 jws5-tomcat-native 1.2.31-14.redhat_14.el7jws RHSA-2023:3420
Red Hat JBoss Core Services 1 jbcs-httpd24-apr-util +8 1.6.1-101.el7jbcs RHSA-2023:3354
Red Hat JBoss Core Services 1 jbcs-httpd24-curl +2 8.0.1-1.el7jbcs RHSA-2023:3354
Red Hat JBoss Core Services 1 jbcs-httpd24-httpd +6 2.4.51-39.el7jbcs RHSA-2023:3354
Red Hat JBoss Core Services 1 jbcs-httpd24-mod_ssl +1 1:2.4.51-39.el7jbcs RHSA-2023:3354
Red Hat JBoss Core Services 1 jbcs-httpd24-openssl +4 1:1.1.1k-14.el7jbcs RHSA-2023:3354

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 edk2-ovmf +3 20221207gitfff6d81270b5-9.el9_2 ALSA-2023:2165
AlmaLinux 9 openssl +3 1:3.0.1-47.el9_1 ALSA-2023:0946
AlmaLinux 8 edk2-ovmf +1 20220126gitbb1bba3d77-4.el8 ALSA-2023:2932
AlmaLinux 8 openssl +3 1:1.1.1k-9.el8_7 ALSA-2023:1405

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 openssl 1:3.0.1-47.el9_1 RLSA-2023:0946
Rocky Linux 8 openssl 1:1.1.1k-9.el8_7 RLSA-2023:1405
ReleasePackageFixed inAdvisory
SLES 15 SP4 openssl-1_1 1.1.1l-150400.7.22.1 SUSE-SU-2023:0311-1
SLES 15 SP4 openssl-3 3.0.1-150400.4.17.1 SUSE-SU-2023:0312-1
SLES 15 SP3 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES 15 SP2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES 12 SP5 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SLES 12 SP4 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
Show 17 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES for SAP 15 SP2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES for SAP 12 SP5 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SLES for SAP 12 SP4 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SLE Real Time 15 SP3 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLE Micro 5.3 openssl-1_1 1.1.1l-150400.7.22.1 SUSE-SU-2023:0311-1
SLE Micro 5.2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLE Micro 5.1 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLE HPC 15 SP3 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLE HPC 15 SP2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SUSE OpenStack Cloud Crowbar 9 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SUSE OpenStack Cloud 9 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SUSE Manager Server 4.2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SUSE Manager Retail Branch Server 4.2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SUSE Manager Proxy 4.2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SUSE Enterprise Storage 7.1 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SUSE Enterprise Storage 7 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed openssl-1_1 1.1.1t-1.1 openSUSE-SU-2024:12688-1
openSUSE Tumbleweed openssl-3 3.0.8-1.1 openSUSE-SU-2024:12716-1
openSUSE Leap 15.4 openssl-1_1 1.1.1l-150400.7.22.1 SUSE-SU-2023:0311-1
openSUSE Leap 15.4 openssl-3 3.0.1-150400.4.17.1 SUSE-SU-2023:0312-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.3 openssl-1_1 1.1.1l-150400.7.22.1 SUSE-SU-2023:0311-1
openSUSE Leap Micro 5.2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
ReleasePackageFixed inAdvisory
Alpine v3.24 openssl 3.0.8-r0 —
Alpine v3.23 openssl 3.0.8-r0 —
Alpine v3.22 openssl 3.0.8-r0 —
Alpine v3.21 openssl 3.0.8-r0 —
Alpine v3.20 openssl 3.0.8-r0 —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 openssl 3.0.8-r0 —
Alpine v3.18 openssl 3.0.8-r0 —
Alpine v3.18 openssl1.1-compat 1.1.1t-r0 —
Alpine v3.17 openssl 3.0.8-r0 —
Alpine v3.17 openssl1.1-compat 1.1.1t-r0 —
Alpine v3.16 openssl 1.1.1t-r0 —
Alpine v3.16 openssl3 3.0.8-r0 —
Alpine v3.15 openssl 1.1.1t-r0 —
Alpine v3.15 openssl3 3.0.8-r0 —
Alpine v3.14 openssl 1.1.1t-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 openssl +3 1:3.0.5-1.amzn2023.0.6 ALAS2023-2023-101
Amazon Linux 2 edk2-ovmf +4 20200801stable-1.amzn2.0.5 ALAS2-2024-2502
Amazon Linux 2 openssl11 +3 1:1.1.1g-12.amzn2.0.11 ALAS2-2023-1934

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 hvloader 1.0.1-4 —
Azure Linux 2 (CBL-Mariner) cloud-hypervisor 30.0-2 —
Azure Linux 2 (CBL-Mariner) hvloader 1.0.1-2 —
Azure Linux 2 (CBL-Mariner) openssl 1.1.1k-21 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 edk2-ovmf +3 20221207gitfff6d81270b5-9.el9_2 ELSA-2023-32790, ELSA-2023-13024, ELSA-2023-2165
Oracle Linux 9 openssl +3 1:3.0.1-47.0.1.el9_1 ELSA-2023-0946
Oracle Linux 8 edk2-ovmf +1 20220126gitbb1bba3d77-4.el8 ELSA-2023-13025, ELSA-2023-2932
Oracle Linux 8 edk2-tools 1:20230821-1.el8 ELSA-2023-32791
Oracle Linux 8 openssl +3 1:1.1.1k-9.el8_7 ELSA-2023-1405
Oracle Linux 7 OVMF +1 1:1.6.6-1.el7 ELSA-2023-13027, ELSA-2023-13026

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling openssl 3.1.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io openssl-src < 111.25.0 111.25.0 GHSA-v5w6-wcm8-jm4q
crates.io openssl-src >= 300.0.0, < 300.0.12 300.0.12 GHSA-v5w6-wcm8-jm4q
crates.io openssl-src >= 0.0.0-0, < 111.25.0 · >= 300.0.0, < 300.0.12 111.25.0, 300.0.12 RUSTSEC-2023-0010

Advisories 50

References