Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1359718 - (CVE-2016-6291) CVE-2016-6291 php: Out-of-bounds access in exif_process_IFD_in_MAKERNOTE
CVE-2016-6291 php: Out-of-bounds access in exif_process_IFD_in_MAKERNOTE
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20160715,repor...
: Security
Depends On: 1359837
Blocks: 1359830
  Show dependency treegraph
 
Reported: 2016-07-25 06:49 EDT by Adam Mariš
Modified: 2016-11-15 10:11 EST (History)
13 users (show)

See Also:
Fixed In Version: php 5.5.38, php 5.6.24, php 7.0.9
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-26 15:59:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2750 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 11:40:02 EST

  None (edit)
Description Adam Mariš 2016-07-25 06:49:05 EDT
An out-of-bounds access due to lack of size check of buffer may lead to memory buffer overflow.

Upstream bug:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=eebcbd5de38a0f1c2876035402cb770e37476519

CVE assignment:

http://seclists.org/oss-sec/2016/q3/137
Comment 1 Adam Mariš 2016-07-25 10:12:34 EDT
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1359837]
Comment 2 Huzaifa S. Sidhpurwala 2016-08-05 02:06:41 EDT
Analysis:

In the affected code snippet:

offset_diff = 2 + NumDirEntries*12 + 4 - php_ifd_get32u(dir_start+10, ImageInfo->motorola_intel);

The output from the php_ifd_get32u() function and the NumDirEntries are attacker controlled, via a specially-crafted JPG image. This results in offset_diff being controlled by the user. Later in the code offset_diff is used to read the IFD tag, which could ultimately lead to OOB Read.

For successful exploitation, a specially crafted JPG image, needs to be read by the PHP script, via exif_read_data() function.
Comment 3 Remi Collet 2016-08-05 02:12:13 EDT
For memory, the recent exif CVE introduce a regression in MakerNote parser.

Regression fixed in:

http://git.php.net/?p=php-src.git;a=commitdiff;h=d5796fb298abb2a3e389818ad924589fa35e58b9

http://git.php.net/?p=php-src.git;a=commitdiff;h=9667ee4f72c7dafce993b71104a52beb7c3aff15
Comment 4 errata-xmlrpc 2016-11-15 06:43:29 EST
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

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