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
Created php tracking bugs for this issue: Affects: fedora-all [bug 1351180]
php-5.6.23-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
php-5.6.23-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
php-5.6.23-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Analysis: This is triggered when a very large image created by imagecreate() is passed to imagepalettetotruecolor(), which triggers an integer overflow followed by heap-buffer overflow. From a php point of view, this needs to be triggered by an attacker controlled imagecreate(), which is very unlikely situation.
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2016:2598 https://rhn.redhat.com/errata/RHSA-2016-2598.html
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html
gd upstream was actually fixed long before gd bundled with php via this commit: https://github.com/libgd/libgd/commit/cfee163a5e848fc3e3fb1d05a30d7557cdd36457 This commit was first included in gd version 2.0.34. See also: https://github.com/libgd/libgd/issues/243