Bug 820000 (CVE-2012-2329)

Summary: CVE-2012-2329 php: buffer overflow flaw in apache_request_headers() in PHP 5.4.x
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: fedora, jorton, jrusnack, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-05 09:38:52 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: 820001    
Bug Blocks:    

Description Vincent Danen 2012-05-08 20:20:41 UTC
A buffer overflow was reported in the apache_request_headers() function in PHP 5.4.x.  The apache_request_headers() function has a loop that copies the name of an environment variable while it fixes cases and converts '_' to '-'.  While this loop is supposed to only copy the variable name ("Cookie" from "HTTP_COOKIE"), it instead continues to the end of the entire environment variable.  If the string being copied is longer than 128 bytes, it will overflow the buffer, resulting in a crash of the php interpretter.


Statement:

Not vulnerable. This issue did not affect the versions of PHP as shipped with Red Hat Enterprise Linux 4, 5, or 6.  This flaw only affects PHP 5.4.0 through 5.4.2.


External Reference:

http://www.php.net/archive/2012.php#id2012-05-08-1

Comment 1 Vincent Danen 2012-05-08 20:22:43 UTC
Created php tracking bugs for this issue

Affects: fedora-17 [bug 820001]

Comment 3 Tomas Hoger 2012-05-10 16:33:12 UTC
This flaw affects PHP-CGI.  Common configurations using Apache httpd PHP module, which is also the default setting in Fedora and Red Hat Enterprise Linux, were not affected by this flaw.