The _gd2GetHeader() is prone to an integer overflow, which result in heap based overflow. Upstream bug: https://bugs.php.net/bug.php?id=72339 Upstream patch: http://git.php.net/?p=php-src.git;a=commitdiff;h=7722455726bec8c53458a32851d2a87982cf0eac 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: When imagecreatefromgd2() is fed a GD2 image format, which has a malformed (or a specially-crafted) headers, it causes integer overflow, followed by heap-buffer overflow. In a typical PHP situation, the attacker needs to trigger this by uploading a specially-crafted gd image to a php application, something which is unlikely.
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
Upstream libgd patches: https://github.com/libgd/libgd/commit/a6a0e7f https://github.com/libgd/libgd/commit/48bbc25 https://github.com/libgd/libgd/commit/aba3db8
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2020:5443 https://access.redhat.com/errata/RHSA-2020:5443