Bug 1404723 (CVE-2016-9933) - CVE-2016-9933 php, gd: Stack overflow in gdImageFillToBorder on truecolor images
Summary: CVE-2016-9933 php, gd: Stack overflow in gdImageFillToBorder on truecolor images
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-9933
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1404737 1554854
Blocks: 1404738
TreeView+ depends on / blocked
 
Reported: 2016-12-14 13:46 UTC by Adam Mariš
Modified: 2021-02-17 02:52 UTC (History)
17 users (show)

Fixed In Version: php 5.6.28, php 7.0.13, php 7.1.0, gd 2.2.2
Doc Type: If docs needed, set a value
Doc Text:
An infinite recursion flaw was found in the gdImageFillToBorder() function from the gd library; also used by PHP imagefilltoborder() function, when passing a negative integer as the color parameter, triggering a stack overflow. A remote attacker with ability to force a negative color identifier when calling the function could crash the PHP application, causing a Denial of Service.
Clone Of:
Environment:
Last Closed: 2017-02-21 09:06:28 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1296 0 None None None 2018-05-03 05:05:35 UTC

Description Adam Mariš 2016-12-14 13:46:59 UTC
When negative color values are passed to gdImageFillToBorder(), it can lead to infinite recursion, since the recursion termination condition will not necessarily be met.

Upstream bug:

https://bugs.php.net/bug.php?id=72696

PHP patch:

https://github.com/php/php-src/commit/863d37ea66d5c960db08d6f4a2cbd2518f0f80d1

libgd patch:

https://github.com/libgd/libgd/commit/77f619d48259383628c3ec4654b1ad578e9eb40e

CVE assignment:

http://seclists.org/oss-sec/2016/q4/658

Comment 1 Adam Mariš 2016-12-14 14:19:06 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1404737]

Comment 3 Cedric Buissart 2017-02-21 09:08:50 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 5 errata-xmlrpc 2018-05-03 05:05:25 UTC
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.3 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS

Via RHSA-2018:1296 https://access.redhat.com/errata/RHSA-2018:1296


Note You need to log in before you can comment on or make changes to this bug.