Bug 1374704 (CVE-2016-7128)

Summary: CVE-2016-7128 php: Memory Leakage In exif_process_IFD_in_TIFF
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, dmcphers, fedora, hhorak, jialiu, jokerman, jorton, kseifried, lmeyer, mmccomas, rcollet, tiwillia, webstack-team, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.6.25, php 7.0.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-20 05:54:42 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:    
Bug Blocks: 1374715    

Description Martin Prpič 2016-09-09 13:01:59 UTC
The following flaw was found in PHP:

A memory leak flaw was found in PHP's exif_process_IFD_in_TIFF(). An attacker can leak address and then use it to bypass some protection such as PIE, ASLR, etc.

Upstream bug:

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

Upstream patch:

https://github.com/php/php-src/commit/6dbb1ee46b5f4725cc6519abf91e512a2a10dfed?w=1

Comment 1 Huzaifa S. Sidhpurwala 2016-10-20 05:54:42 UTC
Analysis:

Flaw is a result of a lack of validation when offset data is used from a TIFF image to read from the input stream. This may result in a OOB read. You need an attacker controlled malicious tiff image, which needs to be processed by exif_read_data() to trigger this flaw.

Comment 2 errata-xmlrpc 2016-11-15 11:45:29 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.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