OpenSSL 1.1.0 ssl_add_clienthello_tlsext heap-based overflow

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.6$0-$5k0.00

Summaryinfo

A vulnerability has been found in OpenSSL 1.1.0 and classified as critical. Affected by this vulnerability is the function ssl_add_clienthello_tlsext. The manipulation leads to heap-based overflow. Remote exploitation of the attack is possible. Furthermore, an exploit is available.

Detailsinfo

A vulnerability was found in OpenSSL 1.1.0 (Network Encryption Software). It has been rated as critical. This issue affects the function ssl_add_clienthello_tlsext. The manipulation with an unknown input leads to a heap-based overflow vulnerability. Using CWE to declare the problem leads to CWE-122. A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). Impacted is confidentiality, integrity, and availability.

The weakness was published 10/13/2016 by Guido Vranken as not defined mailinglist post (Full-Disclosure). The advisory is shared at seclists.org. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details as well as a public exploit are known. The following code is the reason for this vulnerability:

if ((long)(limit - ret - 7 - extlen - idlen) < 0)
    return NULL;
s2n(TLSEXT_TYPE_status_request, ret);
if (extlen + idlen > 0xFFF0)
    return NULL;
s2n(extlen + idlen + 5, ret);
*(ret++) = TLSEXT_STATUSTYPE_ocsp;
s2n(idlen, ret);
for (i = 0; i < sk_OCSP_RESPID_num(s->tlsext_ocsp_ids); i++) {
    /* save position of id len */
    unsigned char *q = ret;
    id = sk_OCSP_RESPID_value(s->tlsext_ocsp_ids, i);
    /* skip over id len */
    ret += 2;
    itmp = i2d_OCSP_RESPID(id, &ret);
    /* write id len */
    s2n(itmp, q);
}
s2n(extlen, ret);
1283if (extlen > 0)
1284    i2d_X509_EXTENSIONS(s->tlsext_ocsp_exts, &ret);
The advisory points out:
(...) if an attacker can somehow influence the ALPN list of an OpenSSL-enabled application (perhaps through another vulnerability), the attacker can write arbitrary data past OpenSSL's heap buffer.

A public exploit has been developed by Guido Vranken and been published immediately after the advisory. The exploit is available at seclists.org. It is declared as proof-of-concept. We expect the 0-day to have been worth approximately $25k-$100k. The code used by the exploit is:

openssl s_client -reconnect -status -alpn `python -c "import sys;
sys.stdout.write('x,'*4000+'x')"`
The advisory illustrates:
It doesn’t crash immediately after ‘ret’ crosses ‘limit’ because the buffer is over-allocated by the code in crypto/buffer/buffer.c (...) And just to be clear, you don’t need to modify the source code of the client in order to make this work. You only need to modify the server code (a separate build if you want) so it sends large tickets.

The mailinglist post contains the following remark:

Triggering this requires that the client sets a very large ALPN list (several thousand bytes). This would be very unusual in a real-world application. For this reason OpenSSL does not treat this as a security vulnerability and I am inclined to agree with this decision.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Productinfo

Type

Name

Version

License

Support

  • end of life (old version)

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 6.6

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Heap-based overflow
CWE: CWE-122 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Guido Vranken
Download: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

10/13/2016 🔍
10/13/2016 +0 days 🔍
10/20/2016 +7 days 🔍
12/14/2016 +55 days 🔍

Sourcesinfo

Product: openssl.org

Advisory: seclists.org
Researcher: Guido Vranken
Status: Not defined

GCVE (VulDB): GCVE-100-93005
scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 10/20/2016 13:16
Updated: 12/14/2016 15:54
Changes: 10/20/2016 13:16 (47), 12/14/2016 15:54 (2)
Complete: 🔍
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!