Security Experts:

Non-Security OpenSSL Bugs Lead to Serious Vulnerability

The OpenSSL Project released on Tuesday versions 1.0.2h and 1.0.1t to patch several vulnerabilities that can be exploited for denial-of-service (DoS) attacks, arbitrary code execution and traffic decryption.

The latest versions of OpenSSL address a high severity flaw (CVE-2016-2107) that was introduced in 2013 as part of the fix for the Lucky 13 TLS attack. The vulnerability, reported on April 13 by Juraj Somorovsky, allows a man-in-the-middle (MitM) attacker to decrypt traffic when the connection uses an AES CBC cipher and the server supports AES-NI instructions.

OpenSSL 1.0.2h and 1.0.1t also patch three low severity issues related to the incorrect handling of large amounts of input data by the EVP_EncodeUpdate() and EVP_EncryptUpdate() functions, and incorrect handling of memory when ASN.1 data is read from a BIO. These flaws have been assigned the CVE identifiers CVE-2016-2105, CVE-2016-2106 and CVE-2016-2109.

The OpenSSL Project also informed users of a high severity vulnerability (CVE-2016-2108) that is a combination of two non-security bugs.

One of them, reported in April 2015 by Huzaifa Sidhpurwala of Red Hat and independently by Hanno Böck, is related to the mishandling of negative zero integers. The bug was patched in June 2015, without anyone being aware of its security impact.

The second bug, related to the mishandling of large universal tags, was reported on March 1, 2016. David Benjamin of Google revealed on March 31 that the two bugs result in a potentially exploitable memory corruption vulnerability. An attacker can exploit the flaw to cause OpenSSL to crash and possibly even to execute arbitrary code.

Here is the OpenSSL Project’s technical description of CVE-2016-2108:

“In previous versions of OpenSSL, ASN.1 encoding the value zero represented as a negative integer can cause a buffer underflow with an out-of-bounds write in i2c_ASN1_INTEGER. The ASN.1 parser does not normally create ‘negative zeroes’ when parsing ASN.1 input, and therefore, an attacker cannot trigger this bug.

 

However, a second, independent bug revealed that the ASN.1 parser (specifically, d2i_ASN1_TYPE) can misinterpret a large universal tag as a negative zero value. Large universal tags are not present in any common ASN.1 structures (such as X509) but are accepted as part of ANY structures.

 

Therefore, if an application deserializes untrusted ASN.1 structures containing an ANY field, and later reserializes them, an attacker may be able to trigger an out-of-bounds write. This has been shown to cause memory corruption that is potentially exploitable with some malloc implementations.”

Since the first bug was patched in June 2015 with the release of OpenSSL 1.0.2c and 1.0.1o, the attack method discovered by Google’s David Benjamin does not work against these or more recent versions.

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.