Bug 1223408 (CVE-2015-4025)

Summary: CVE-2015-4025 php: CVE-2006-7243 regressions in 5.4+
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, fedora, jdetiber, jialiu, jkeck, jliggitt, jokerman, jorton, kseifried, lmeyer, mmaslano, mmccomas, rcollet, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.4.41, php 5.5.25, php 5.6.9 Doc Type: Bug Fix
Doc Text:
It was found that certain PHP functions did not properly handle file names containing a NULL character. A remote attacker could possibly use this flaw to make a PHP script access unexpected files and bypass intended file system access restrictions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-09 21:49:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1223447, 1228054, 1228055, 1228056, 1228057, 1228058, 1228059, 1228060, 1228061    
Bug Blocks: 1222994    

Description Vasyl Kaigorodov 2015-05-20 13:13:44 UTC
Regressions of parts of the CVE-2006-7243 fix were found in PHP >= 5.4. This issue is similar to CVE-2015-2348 (bug 1207682) and CVE-2014-5120 (bug 1132793).

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

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

Comment 1 Vasyl Kaigorodov 2015-05-20 14:12:09 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1223447]

Comment 2 Tomas Hoger 2015-05-21 20:59:31 UTC
I noted CVE-2006-7243 (see bug 662707) regressions in PHP 5.4+ for the following functions in the upstream bug report:

- set_include_path()
- tempnam() - second argument only
- rmdir()
- readlink()

readlink() was already fixed in 5.4.40 / 5.5.24 / 5.6.8, see bug 1213407 comment 5.

Linked upstream commit includes additional fixes for issue not mentioned in the upstream bug report 69418.

- pcntl_exec() - tracked via separate bug 1223422 / CVE-2015-4026
- opendir() / dir()
- chroot()

These additional changes are not 5.4+ regressions.

Comment 3 Fedora Update System 2015-05-26 03:40:34 UTC
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 6 Fedora Update System 2015-05-27 16:13:07 UTC
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 7 Fedora Update System 2015-05-27 16:23:23 UTC
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 12 Remi Collet 2015-06-08 14:06:36 UTC
Additional commit for tests:

http://git.php.net/?p=php-src.git;a=commit;h=634aa0a2dbf8ec5e6fabb4ee01c6d1355ba7ee67

Comment 13 errata-xmlrpc 2015-06-23 08:13:18 UTC
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 14 errata-xmlrpc 2015-06-25 08:32:32 UTC
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 15 errata-xmlrpc 2015-06-25 08:43:53 UTC
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 16 errata-xmlrpc 2015-07-09 18:53:45 UTC
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