Bug 1178736 (CVE-2014-9427)

Summary: CVE-2014-9427 php: out of bounds read when parsing a crafted .php file
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, falonso, fedora, jdetiber, jialiu, jkeck, jokerman, jorton, jrusnack, kseifried, lmeyer, mmaslano, mmccomas, mmilgram, rcollet, webstack-team, wmealing, yozone
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.4.37, php 5.5.21, php 5.6.5 Doc Type: Bug Fix
Doc Text:
A flaw was found in the way PHP handled malformed source files when running in CGI mode. A specially crafted PHP file could cause PHP CGI to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-27 12:32:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1178740, 1204745, 1204746, 1204747, 1204748, 1205733, 1205734    
Bug Blocks: 1178738    

Description Vasyl Kaigorodov 2015-01-05 12:35:15 UTC
It was reported that a one byte file containing '#' and no newline causes php-cgi to segfault:

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

...
$ printf "#" >crashme.php
$ ./php-cgi crashme.php
Segmentation fault
...

Upstream patch that fixes this issue:
http://git.php.net/?p=php-src.git;a=commit;h=f9ad3086693fce680fbe246e4a45aa92edd2ac35

Comment 1 Vasyl Kaigorodov 2015-01-05 12:36:48 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1178740]

Comment 4 Tomas Hoger 2015-01-30 20:03:16 UTC
Fixed upstream in PHP 5.6.5, 5.5.21, and 5.4.37:

http://php.net/ChangeLog-5.php#5.6.5
http://php.net/ChangeLog-5.php#5.5.21
http://php.net/ChangeLog-5.php#5.4.37

Comment 5 Fedora Update System 2015-02-06 03:59:36 UTC
php-5.6.5-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 6 Fedora Update System 2015-02-06 04:03:21 UTC
php-5.5.21-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 7 Vincent Danen 2015-02-09 14:49:21 UTC
Statement:

This flaw requires that a user is able to upload arbitrary PHP code on the system, be a local user able to execute arbitrary PHP code, or have the ability to modify existing PHP code on the system.  It also requires that the modified/arbitrary PHP code is executed with the php-cgi program, and the net result is that php-cgi crashes, effectively resulting in a self-denial of service.

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 14 errata-xmlrpc 2015-06-04 08:03:27 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 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS

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

Comment 15 errata-xmlrpc 2015-06-04 08:06:47 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 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS

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