CVE-2016-5767: Buffer Overflow
Fixed bug (Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow). (CVE-2016-5767)
Other sources
Integer overflow in the gdImageCreate function in gd.c in the GD Graphics Library (aka libgd) before 2.0.34RC1, as used in PHP before 5.5.37, 5.6.x before 5.6.23, and 7.x before 7.0.8, allows remote attackers to cause a denial of service (heap-based buffer overflow and application crash) or possibly have unspecified other impact via a crafted image dimensions.
— MITRE
The gdImagePaletteToTrueColor() is prone to an integer overflow, which result in heap based overflow.
Upstream bug:
https://bugs.php.net/bug.php?id=72446
Upstream patch:
http://git.php.net/?p=php-src.git;a=commitdiff;h=c395c6e5d7e8df37a21265ff76e48fe75ceb5ae6
CVE assignment:
http://seclists.org/oss-sec/2016/q2/589
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.0.8 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.5.37 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.6.23 - Upgrade
Upgrade
redhat/gdto a version that resolves this vulnerability.Fixed in 2.0.34 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.0.34RC1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.5.37 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.6.23 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.0.8
Event History
Frequently Asked Questions
What is the severity of CVE-2016-5767?
CVE-2016-5767 has a high severity, as it can lead to denial of service through a heap-based buffer overflow.
How do I fix CVE-2016-5767?
To fix CVE-2016-5767, upgrade to PHP versions 7.0.8 or newer, or GD Graphics Library version 2.0.34RC1 or newer.
Which versions of PHP are affected by CVE-2016-5767?
PHP versions below 5.5.37, 5.6.x before 5.6.23, and 7.x before 7.0.8 are affected by CVE-2016-5767.
Is there a workaround for CVE-2016-5767?
There are no known effective workarounds for CVE-2016-5767; upgrading to patched versions is recommended.
What type of vulnerability is CVE-2016-5767 classified as?
CVE-2016-5767 is classified as a remote denial of service vulnerability due to integer overflow.