Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1391068 (CVE-2016-8670)

Summary: CVE-2016-8670 gd, php: Stack based buffer overflow in dynamicGetbuf
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, databases-maint, dmcphers, dmoppert, fedora, hhorak, jialiu, jmlich83, jokerman, jorton, kseifried, lmeyer, mmccomas, mskalick, rcollet, sardella, tiwillia, trepik, varekova, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: php 5.6.27, php 7.0.11, php 7.1.0 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in gd. Integer underflow in a calculation in dynamicGetbuf() was incorrectly handled, leading in some circumstances to an out of bounds write through a very large argument to memcpy(). An attacker could create a crafted image that would lead to a crash or, potentially, code execution.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 09:39:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1391076, 1391077    
Bug Blocks:    

Description Adam Mariš 2016-11-02 14:01:19 UTC
Stack based buffer overflow was found in dynamicGetbuf when passing negative `rlen` as size to memcpy().

PHP bug:

GD patch:

PHP patch:;a=commit;h=cc08cbc84d46933c1e9e0149633f1ed5d19e45e9

CVE assignment:

Comment 1 Adam Mariš 2016-11-02 14:11:05 UTC
Created gd tracking bugs for this issue:

Affects: fedora-all [bug 1391077]

Comment 2 Adam Mariš 2016-11-02 14:11:18 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1391076]