Bug 1380450 (CVE-2016-7568)

Summary: CVE-2016-7568 gd, php: Integer overflow in gdImageWebpCtx
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, carnil, dmcphers, dmoppert, fedora, hhorak, jialiu, jmlich83, jokerman, jorton, kseifried, lmeyer, mmccomas, mskalick, rcollet, tiwillia, varekova, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An integer overflow flaw, leading to a heap-based buffer overflow, was found in gd. A specially crafted image, when converted to webp, could cause the application to crash or potentially execute arbitrary code.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-30 04:08:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1380452, 1380453    
Bug Blocks: 1380454    

Description Adam Mariš 2016-09-29 16:00:19 UTC
An integer overflow vulnerability was found in function gdImageWebpCtx of file gd_webp.c in libgd. It could lead to heap buffer overflow. Both PHP 7.0.10 and libgd 2.2.3 were affected.

PHP bug:

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

PHP patch:

https://github.com/php/php-src/commit/c18263e0e0769faee96a5d0ee04b750c442783c6

libgd bug:

https://github.com/libgd/libgd/issues/308

libgd patch:

https://github.com/libgd/libgd/commit/40bec0f38f50e8510f5bb71a82f516d46facde03

CVE assignment:

http://seclists.org/oss-sec/2016/q3/639

Comment 1 Adam Mariš 2016-09-29 16:04:26 UTC
Created gd tracking bugs for this issue:

Affects: fedora-all [bug 1380453]

Comment 2 Adam Mariš 2016-09-29 16:04:37 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1380452]

Comment 3 Doran Moppert 2016-09-30 03:44:40 UTC
This vulnerability is only present if gd is build against libwebp.  Fedora does so, but no Red Hat Enterprise Linux versions of gd do.