PT-2021-4043 · Openssl+13 · Openssl+13

Ingo Schwarze

·

Published

2021-08-24

·

Updated

2026-04-27

·

CVE-2021-3712

CVSS v3.1

7.4

High

VectorAV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H
Name of the Vulnerable Software and Affected Versions OpenSSL versions 1.1.1 through 1.1.1k OpenSSL versions 1.0.2 through 1.0.2y
Description The issue is related to the representation of ASN.1 strings within OpenSSL as an ASN1 STRING structure, which contains a buffer holding the string data and a field holding the buffer length. This contrasts with normal C strings, which are represented as a buffer for the string data terminated with a NUL (0) byte. Although not a strict requirement, ASN.1 strings parsed using OpenSSL's own "d2i" functions or set with the ASN1 STRING set() function will additionally NUL terminate the byte array in the ASN1 STRING structure. However, it is possible for applications to directly construct valid ASN1 STRING structures that do not NUL terminate the byte array. Numerous OpenSSL functions that print ASN.1 data have been found to assume that the ASN1 STRING byte array will be NUL terminated, even though this is not guaranteed for strings that have been directly constructed. This can lead to a read buffer overrun, potentially resulting in a crash (causing a Denial of Service attack) or the disclosure of private memory contents (such as private keys or sensitive plaintext). The X509 get1 email(), X509 REQ get1 email(), and X509 get1 ocsp() functions are also affected.
Recommendations For OpenSSL versions 1.1.1 through 1.1.1k, update to version 1.1.1l or later. For OpenSSL versions 1.0.2 through 1.0.2y, update to version 1.0.2za or later. As a temporary workaround, consider disabling the use of directly constructed ASN1 STRING structures until a patch is available. Restrict access to the affected OpenSSL functions to minimize the risk of exploitation. Avoid using the ASN1 STRING set0() function to construct ASN1 STRING structures until the issue is resolved.

Exploit

Fix

DoS

Out of bounds Read

Weakness Enumeration

Related Identifiers

ALT-PU-2021-2615
ALT-PU-2021-2637
ALT-PU-2021-2646
ALT-PU-2021-2686
ALT-PU-2021-2687
ALT-PU-2021-3241
ALT-PU-2022-2171
ALT-PU-2023-1912
ALT-PU-2023-4398
ALT-PU-2023-5593
AZL-6780
BDU:2021-04571
CESA-2021_5226
CVE-2021-3712
DLA-2766-1
DLA-2774-1
DSA-4963-1
GHSA-Q9WJ-F4QW-6VFJ
JLSEC-2026-225
MGASA-2021-0429
MGASA-2022-0035
OESA-2021-1330
OESA-2022-1938
OESA-2024-2092
OESA-2024-2093
OESA-2024-2094
OESA-2024-2095
OPENSUSE-SU-2021:1188-1
OPENSUSE-SU-2021:1189-1
OPENSUSE-SU-2021:1248-1
OPENSUSE-SU-2021:1261-1
OPENSUSE-SU-2021:2827-1
OPENSUSE-SU-2021:2830-1
OPENSUSE-SU-2021:2966-1
OPENSUSE-SU-2021:2994-1
OPENSUSE-SU-2021_1188-1
OPENSUSE-SU-2021_1189-1
OPENSUSE-SU-2021_1248-1
OPENSUSE-SU-2021_1261-1
OPENSUSE-SU-2021_2827-1
OPENSUSE-SU-2021_2830-1
OPENSUSE-SU-2021_2966-1
OPENSUSE-SU-2021_2994-1
OPENSUSE-SU-2024:11126-1
OPENSUSE-SU-2024:11127-1
OPENSUSE-SU-2024:12303-1
RHSA-2021:4614
RHSA-2021:4861
RHSA-2021:5226
RHSA-2021_5226
RHSA-2022:0064
RHSA-2022_0064
RLSA-2021:5226
RUSTSEC-2021-0098
SUSE-FU-2022:0445-1
SUSE-SU-2021:14791-1
SUSE-SU-2021:14792-1
SUSE-SU-2021:14801-1
SUSE-SU-2021:14802-1
SUSE-SU-2021:2825-1
SUSE-SU-2021:2826-1
SUSE-SU-2021:2827-1
SUSE-SU-2021:2829-1
SUSE-SU-2021:2830-1
SUSE-SU-2021:2831-1
SUSE-SU-2021:2833-1
SUSE-SU-2021:2852-1
SUSE-SU-2021:2966-1
SUSE-SU-2021:2966-2
SUSE-SU-2021:2967-1
SUSE-SU-2021:2968-1
SUSE-SU-2021:2994-1
SUSE-SU-2021:2995-1
SUSE-SU-2021:2996-1
SUSE-SU-2021:3019-1
SUSE-SU-2021:3144-1
SUSE-SU-2021_14791-1
SUSE-SU-2021_14792-1
SUSE-SU-2021_14801-1
SUSE-SU-2021_14802-1
SUSE-SU-2021_2825-1
SUSE-SU-2021_2826-1
SUSE-SU-2021_2827-1
SUSE-SU-2021_2829-1
SUSE-SU-2021_2831-1
SUSE-SU-2021_2852-1
SUSE-SU-2021_2966-1
SUSE-SU-2021_2967-1
SUSE-SU-2021_2968-1
SUSE-SU-2021_2994-1
SUSE-SU-2021_2995-1
SUSE-SU-2021_2996-1
SUSE-SU-2021_3019-1
SUSE-SU-2021_3144-1
USN-5051-1
USN-5051-2
USN-5051-3
USN-5051-4
USN-5088-1
USN-7894-1
USN-7894-2

Affected Products

Alt Linux
Astra Linux
Centos
Check Point Gaia
Freebsd
Hpe Ilo
Ibm Aix
Linuxmint
Openssl
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu