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 1223425 - (CVE-2015-4021) CVE-2015-4021 php: memory corruption in phar_parse_tarfile caused by empty entry file name
CVE-2015-4021 php: memory corruption in phar_parse_tarfile caused by empty en...
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=20150514,repor...
: Security
Depends On: 1223447 1228052 1228053 1228054 1228055 1228056 1228057 1228058 1228059 1228060 1228061
Blocks: 1222994
  Show dependency treegraph
 
Reported: 2015-05-20 09:34 EDT by Vasyl Kaigorodov
Modified: 2015-11-25 05:36 EST (History)
16 users (show)

See Also:
Fixed In Version: php 5.4.41, php 5.5.25, php 5.6.9
Doc Type: Bug Fix
Doc Text:
An integer underflow flaw leading to out-of-bounds memory access was found in the way PHP's Phar extension parsed Phar archives. A specially crafted archive could cause PHP to crash or, possibly, execute arbitrary code when opened.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-09 17:50:31 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-2015:1135 normal SHIPPED_LIVE Important: php security and bug fix update 2015-06-23 08:11:40 EDT
Red Hat Product Errata RHSA-2015:1186 normal SHIPPED_LIVE Important: php55-php security update 2015-06-25 08:31:54 EDT
Red Hat Product Errata RHSA-2015:1187 normal SHIPPED_LIVE Important: rh-php56-php security update 2015-06-25 08:43:17 EDT
Red Hat Product Errata RHSA-2015:1218 normal SHIPPED_LIVE Moderate: php security update 2015-07-09 17:01:41 EDT
Red Hat Product Errata RHSA-2015:1219 normal SHIPPED_LIVE Moderate: php54-php security update 2015-07-09 18:53:28 EDT

  None (edit)
Description Vasyl Kaigorodov 2015-05-20 09:34:06 EDT
It was reported that when phar_parse_tarfile() entry filename starts with NULL, this may lead to a single byte memory corruption.

Upstream report:
https://bugs.php.net/bug.php?id=69453

Upstream fix:
http://git.php.net/?p=php-src.git;a=commitdiff;h=c27f012b7a447e59d4a704688971cbfa7dddaa74
http://git.php.net/?p=php-src.git;a=commitdiff;h=e2bbf0a2df2cd864fa86d613eb316b249811a6f6

CVE request:
http://seclists.org/oss-sec/2015/q2/479
Comment 1 Vasyl Kaigorodov 2015-05-20 10:13:22 EDT
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1223447]
Comment 2 Fedora Update System 2015-05-25 23:40:31 EDT
php-5.6.9-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 3 Fedora Update System 2015-05-27 12:13:14 EDT
php-5.6.9-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2015-05-27 12:23:27 EDT
php-5.5.25-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Tomas Hoger 2015-05-28 11:06:57 EDT
If file name of a file in PHAR archive is empty, it causes out-of-bounds read.  Depending on platform, this out of bounds read may be likely to cause crash (e.g. on 64 bit platforms).  If the accessed memory is mapped and contains '/', it is overwritten with '\0' and file name length counter is decremented.  This may lead to further out of bounds accesses.

This issue should only be relevant in use case where Phar archives are opened / inspected, but no code is run from them.  Expected use of Phar archives is provide a single file bundle containing PHP application or library, and hence need to be fully trusted as code from archives is executed.
Comment 11 errata-xmlrpc 2015-06-23 04:13:35 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:1135 https://rhn.redhat.com/errata/RHSA-2015-1135.html
Comment 12 errata-xmlrpc 2015-06-25 04:32:43 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2015:1186 https://rhn.redhat.com/errata/RHSA-2015-1186.html
Comment 13 errata-xmlrpc 2015-06-25 04:44:02 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2015:1187 https://rhn.redhat.com/errata/RHSA-2015-1187.html
Comment 14 errata-xmlrpc 2015-07-09 13:08:02 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2015:1218 https://rhn.redhat.com/errata/RHSA-2015-1218.html
Comment 15 errata-xmlrpc 2015-07-09 14:53:56 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2015:1219 https://rhn.redhat.com/errata/RHSA-2015-1219.html

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