Bug 1419015 (CVE-2016-10158)

Summary: CVE-2016-10158 php: Wrong calculation in exif_convert_any_to_int function
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, cbuissar, dmcphers, fedora, hhorak, jialiu, jokerman, jorton, kseifried, lmeyer, mmccomas, rcollet, sardella, tiwillia, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.6.30, php 7.0.15, php 7.1.1 Doc Type: If docs needed, set a value
Doc Text:
It was found that the exif_convert_any_to_int() function in PHP was vulnerable to floating point exceptions when parsing tags in image files. A remote attacker with the ability to upload a malicious image could crash PHP, causing a Denial of Service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-10 16:35:30 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: 1419021, 1421209, 1421210, 1421211, 1421212, 1421214, 1421215, 1421216, 1421217, 1554540    
Bug Blocks: 1419023    

Description Adam Mariš 2017-02-03 12:34:27 UTC
The exif_convert_any_to_int function in ext/exif/exif.c in PHP before 5.6.30, 7.0.x before 7.0.15, and 7.1.x before 7.1.1 allows remote attackers to cause a denial of service (application crash) via crafted EXIF data that triggers an attempt to divide the minimum representable negative integer by -1. 

Upstream bug:

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

Upstream patch:

https://github.com/php/php-src/commit/1cda0d7c2ffb62d8331c64e703131d9cabdc03ea

Comment 1 Adam Mariš 2017-02-03 12:50:14 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1419021]

Comment 7 Cedric Buissart 2017-02-10 16:33:07 UTC
Statement:

Red Hat Product Security has rated this issue as having Moderate 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 10 errata-xmlrpc 2018-05-03 05:06:18 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