CVE-2016-2106: Integer Overflow
An integer overflow flaw, leading to a buffer overflow, was found in the way the EVPEncryptUpdate() function of OpenSSL parsed very large amounts of input data. A remote attacker could use this flaw to crash an application using OpenSSL or, possibly, execute arbitrary code with the permissions of the user running that application.
Other sources
Integer overflow in the EVPEncryptUpdate function in crypto/evp/evpenc.c in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h allows remote attackers to cause a denial of service (heap memory corruption) via a large amount of data.
Quoting form the draft of OpenSSL upstream advisory:
EVPEncryptUpdate overflow (CVE-2016-2106) ==========================================
Severity: Low
An overflow can occur in the EVPEncryptUpdate() function. If an attacker is able to supply very large amounts of input data after a previous call to EVPEncryptUpdate() with a partial block then a length check can overflow resulting in a heap corruption. Following an analysis of all OpenSSL internal usage of the EVPEncryptUpdate() function all usage is one of two forms. The first form is where the EVPEncryptUpdate() call is known to be the first called function after an EVPEncryptInit(), and therefore that specific call must be safe. The second form is where the length passed to EVPEncryptUpdate() can be seen from the code to be some small value and therefore there is no possibility of an overflow. Since all instances are one of these two forms, it is believed that there can be no overflows in internal code due to this problem. It should be noted that EVPDecryptUpdate() can call EVPEncryptUpdate() in certain code paths. Also EVPCipherUpdate() is a synonym for EVPEncryptUpdate(). All instances of these calls have also been too and it is believed there are no instances in internal usage where an overflow could occur.
This could still represent a security issue for end user code that calls this function directly.
OpenSSL 1.0.2 users should upgrade to 1.0.2h OpenSSL 1.0.1 users should upgrade to 1.0.1t
This issue was reported to OpenSSL on 3rd March 2016 by Guido Vranken. The fix was developed by Matt Caswell of the OpenSSL development team.
Affected Software
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2016-2106?
CVE-2016-2106 is considered a high severity vulnerability due to the potential for buffer overflow and remote code execution.
How do I fix CVE-2016-2106?
To fix CVE-2016-2106, you should upgrade OpenSSL to version 1.0.1s or 1.0.2h, or apply the relevant patches provided by your distribution.
What types of applications are affected by CVE-2016-2106?
Applications that utilize OpenSSL for encryption functions, particularly those using EVP_EncryptUpdate, are affected by CVE-2016-2106.
Can CVE-2016-2106 lead to remote code execution?
Yes, if exploited, CVE-2016-2106 can allow an attacker to execute arbitrary code on the affected system with the privileges of the application using OpenSSL.
Which OpenSSL versions are vulnerable to CVE-2016-2106?
OpenSSL versions 1.0.1 and 1.0.2 prior to 1.0.2h are vulnerable to CVE-2016-2106.