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
Created php tracking bugs for this issue: Affects: fedora-all [bug 1305565]
CVE assignment: http://seclists.org/oss-sec/2016/q1/428
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.
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