Skip to content
OpenAdvisories

Description

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.

Affected products

VendorProductAffectedFixed
OpenSSL OpenSSL 3.0.0 – < 3.0.8, 1.1.1 – < 1.1.1t, 1.0.2 – < 1.0.2zg 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
Ubuntu 18.04 LTS openssl1.0 1.0.2n-1ubuntu5.11 USN-5845-1
Show 10 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 16.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 FIPS-updates 16.04 LTS openssl 1.0.2g-1ubuntu4.fips.4.20.6 —
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 —
Ubuntu Pro 16.04 LTS openssl 1.0.2g-1ubuntu4.20+esm6 USN-5845-2
Ubuntu Pro 14.04 LTS openssl 1.0.1f-1ubuntu2.27+esm6 USN-5845-2
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 edk2 +2 20220126gitbb1bba3d77-2.el8_6.1 RHSA-2023:4128
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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
SLES 15 SP3 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES 15 SP2 openssl-1_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
SLES 15 SP2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES 15 SP1 openssl-1_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
SLES 15 SP1 openssl-1_1 1.1.0i-150100.14.42.1 SUSE-SU-2023:0308-1
SLES 12 SP5 openssl-1_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-1
SLES 12 SP5 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
Show 22 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP4 openssl-1_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-1
SLES 12 SP4 openssl-1_1 1.1.1d-2.75.1 SUSE-SU-2023:0309-1
SLES 12 SP2 openssl 1.0.2j-60.86.1 SUSE-SU-2023:0684-1
SLES 11 SP4 openssl1 1.0.1g-0.58.56.1 SUSE-SU-2023:0307-1
SLES for SAP 15 SP3 openssl-1_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
SLES for SAP 15 SP2 openssl-1_1 1.1.1d-150200.11.57.1 SUSE-SU-2023:0310-1
SLES for SAP 15 SP1 openssl-1_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-1
SLES for SAP 15 SP1 openssl-1_1 1.1.0i-150100.14.42.1 SUSE-SU-2023:0308-1
SLES for SAP 12 SP5 openssl-1_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-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_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-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
SLE HPC 15 SP1 openssl-1_1 1.1.0i-150100.14.42.1 SUSE-SU-2023:0308-1
SUSE OpenStack Cloud Crowbar 9 openssl-1_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-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_0_0 1.0.2p-3.64.1 SUSE-SU-2023:0306-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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-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_0_0 1.0.2u-12.1 openSUSE-SU-2024:12687-1
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_0_0 1.0.2p-150000.3.65.1 SUSE-SU-2023:0305-2, SUSE-SU-2023:0305-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 openssl +4 1:1.0.2k-24.amzn2.0.6 ALAS2-2023-1935
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-r7jw-wp68-3xch
crates.io openssl-src >= 300.0.0, < 300.0.12 300.0.12 GHSA-r7jw-wp68-3xch
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-0009

Advisories 50

References