Red Hat Bugzilla – Bug 1305543
CVE-2016-2554 php: buffer overflow in handling of long link names in tar phar archives
Last modified: 2016-11-15 09:02:43 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().
Created php tracking bugs for this issue:
Affects: fedora-all [bug 1305565]
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:
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.
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