Bug 820000 (CVE-2012-2329) - CVE-2012-2329 php: buffer overflow flaw in apache_request_headers() in PHP 5.4.x
Summary: CVE-2012-2329 php: buffer overflow flaw in apache_request_headers() in PHP 5.4.x
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: CVE-2012-2329
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 820001
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-08 20:20 UTC by Vincent Danen
Modified: 2021-02-23 14:47 UTC (History)
4 users (show)

Fixed In Version: php 5.4.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-05 09:38:52 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.