OpenSSL 1.0.1s/1.0.2g ASN.1 BIO crypto/asn1/a_d2i_fp.c d2i_CMS_bio resource management
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.5 | $0-$5k | 0.00 |
Summary
A vulnerability classified as problematic was found in OpenSSL 1.0.1s/1.0.2g. Affected is the function d2i_CMS_bio of the file crypto/asn1/a_d2i_fp.c of the component ASN.1 BIO. Such manipulation leads to resource management.
This vulnerability is listed as CVE-2016-2109. The attack may be performed from remote. There is no available exploit.
Upgrading the affected component is advised.
Details
A vulnerability was found in OpenSSL 1.0.1s/1.0.2g (Network Encryption Software). It has been rated as critical. Affected by this issue is the function d2i_CMS_bio of the file crypto/asn1/a_d2i_fp.c of the component ASN.1 BIO. The manipulation with an unknown input leads to a resource management vulnerability. Using CWE to declare the problem leads to CWE-399. Impacted is confidentiality, integrity, and availability. CVE summarizes:
The asn1_d2i_read_bio function in crypto/asn1/a_d2i_fp.c in the ASN.1 BIO implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h allows remote attackers to cause a denial of service (memory consumption) via a short invalid encoding.
The weakness was presented 05/03/2016 by Brian Carpenter with Oracle as 20160503.txt as confirmed advisory (Website). The advisory is available at openssl.org. The public release was coordinated in cooperation with the vendor. This vulnerability is handled as CVE-2016-2109 since 01/29/2016. The attack may be launched remotely. No form of authentication is required for exploitation. Technical details are known, but there is no available exploit. The following code is the reason for this vulnerability:
if (!BUF_MEM_grow_clean(b, len + want)) {
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE);
goto err;
}
while (want > 0) {
i = BIO_read(in, &(b->data[len]), want);
if (i <= 0) {
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
ASN1_R_NOT_ENOUGH_DATA);
goto err;
}
len += i;
want -= i;
} The advisory points out:When ASN.1 data is read from a BIO using functions such as d2i_CMS_bio() a short invalid encoding can casuse allocation of large amounts of memory potentially consuming excessive resources or exhausting memory.
The vulnerability was handled as a non-public zero-day exploit for at least 29 days. During that time the estimated underground price was around $5k-$25k. The vulnerability scanner Nessus provides a plugin with the ID 91033 (RHEL 7 : openssl (RHSA-2016:0722)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Red Hat Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 196457 (Ubuntu Security Notification for Openssl Vulnerabilities (USN-2959-1)).
Upgrading to version 1.0.1t or 1.0.2h eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at git.openssl.org. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:
size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
while (want > 0) {
size_t chunk = want > chunk_max ? chunk_max : want;
if (!BUF_MEM_grow_clean(b, len + chunk)) {
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE);
goto err;
}
want -= chunk;
while (chunk > 0) {
i = BIO_read(in, &(b->data[len]), chunk);
if (i <= 0) {
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
ASN1_R_NOT_ENOUGH_DATA);
goto err;
}
len += i;
chunk -= i;
}
if (chunk_max < INT_MAX/2)
chunk_max *= 2;
} The advisory contains the following remark:The memory based functions such as d2i_X509() are *not* affected. Since the memory based functions are used by the TLS library, TLS applications are not affected.
The vulnerability is also documented in the databases at Tenable (91033) and SecurityFocus (BID 91787†). tools.cisco.com is providing further details. See VDB-76354, VDB-78584, VDB-78603 and VDB-78601 for similar entries. If you want to get best quality of vulnerability data, you may have to visit VulDB.
Product
Type
Name
Version
License
Support
- end of life (old version)
Website
- Product: https://www.openssl.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.7VulDB Meta Temp Score: 8.5
VulDB Base Score: 9.8
VulDB Temp Score: 9.4
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 7.5
NVD Vector: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Resource managementCWE: CWE-399 / CWE-404
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 91033
Nessus Name: RHEL 7 : openssl (RHSA-2016:0722)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
OpenVAS ID: 841567
OpenVAS Name: SuSE Update for openssl openSUSE-SU-2016:1240-1 (openssl)
OpenVAS File: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Upgrade: OpenSSL 1.0.1t/1.0.2h
Patch: c62981390d6cf9e3d612c489b8b77c2913b25807
Timeline
01/29/2016 🔍04/04/2016 🔍
05/03/2016 🔍
05/03/2016 🔍
05/04/2016 🔍
05/04/2016 🔍
05/11/2016 🔍
07/15/2016 🔍
07/28/2022 🔍
Sources
Product: openssl.orgAdvisory: 20160503.txt
Researcher: Brian Carpenter
Organization: Oracle
Status: Confirmed
Confirmation: 🔍
Coordinated: 🔍
CVE: CVE-2016-2109 (🔍)
GCVE (CVE): GCVE-0-2016-2109
GCVE (VulDB): GCVE-100-83258
OVAL: 🔍
SecurityFocus: 91787 - Oracle July 2016 Critical Patch Update Multiple Vulnerabilities
SecurityTracker: 1035721
Misc.: 🔍
See also: 🔍
Entry
Created: 05/04/2016 11:34Updated: 07/28/2022 08:05
Changes: 05/04/2016 11:34 (83), 11/12/2018 08:32 (14), 07/28/2022 08:05 (4)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.