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
Created php tracking bugs for this issue: Affects: fedora-all [bug 1359837]
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.
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
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