Bug 1305543 - (CVE-2016-2554) CVE-2016-2554 php: buffer overflow in handling of long link names in tar phar archives
CVE-2016-2554 php: buffer overflow in handling of long link names in tar phar...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20160131,reported=2...
: Security
Depends On: 1305565
Blocks: 1305564
  Show dependency treegraph
 
Reported: 2016-02-08 09:41 EST by Adam Mariš
Modified: 2016-11-15 09:02 EST (History)
13 users (show)

See Also:
Fixed In Version: php 5.6.18, php 5.5.32
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-22 15:59:34 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)

  None (edit)
Description Adam Mariš 2016-02-08 09:41:24 EST
A stack overflow vulnerability was reported that may occur when decompressing tar archives due to phar_tar_writeheaders() potentially copying non-terminated linknames from entries parsed by phar_parse_tarfile().

Upstream bug:

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

Upstream patch:

https://git.php.net/?p=php-src.git;a=commit;h=07c7df68bd68bbe706371fccc77c814ebb335d9e
Comment 1 Adam Mariš 2016-02-08 10:13:00 EST
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1305565]
Comment 2 Andrej Nemec 2016-02-25 05:24:37 EST
CVE assignment:

http://seclists.org/oss-sec/2016/q1/428
Comment 3 Tomas Hoger 2016-08-22 15:59:34 EDT
This is a stack-based buffer overflow, not stack overflow as indicated by the upstream bug summary.  In PHP packages included in Red Hat products, this issue is mitigated by the use of FORTIFY_SOURCE.  This protection causes the overflow to be detected before it actually happens and terminates program execution, limiting impact to crash of the PHP interpreter.

Note that Phar files are distribution format for PHP applications (similar to Java Jar format) and their content is typically executed on the server.  Malicious Phar archive can therefore execute code on the system without exploiting any parsing issues.

If Phar extension is not used, it can be disabled by commenting out the following line:

  extension=phar.so

in phar.ini to prevent loading of the extension.

Given the limited impact of this issue, there's currently no plan to backport the fix to the versions of PHP as shipped in Red Hat products.
Comment 5 errata-xmlrpc 2016-11-15 06:49:31 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.