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.
Created php tracking bugs for this issue
Affects: fedora-17 [bug 820001]
Related upstream commits:
Upstream bug (currently non-public):
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.