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>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: fedora, jorton, jrusnack, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=important,public=20120508,reported=20120504,source=internet,cvss2=6.8/AV:N/AC:M/Au:N/C:P/I:P/A:P,rhel-3/php=notaffected,rhel-4/php=notaffected,rhel-5/php=notaffected,rhel-5/php53=notaffected,rhel-6/php=notaffected,fedora-16/php=notaffected,fedora-17/php=affected,cwe=CWE-697->CWE-119
Fixed In Version: php 5.4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-05 05:38:52 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 820001    
Bug Blocks:    

Description Vincent Danen 2012-05-08 16:20:41 EDT
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.


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:

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

Affects: fedora-17 [bug 820001]
Comment 3 Tomas Hoger 2012-05-10 12:33:12 EDT
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.