GLSA Bodhisattva
Joined: 25 Feb 2003 Posts: 3829 Location: Essen, Germany
|
Posted: Wed Oct 06, 2004 6:09 am Post subject: [ GLSA 200410-04 ] PHP: Memory disclosure and arbitrary loca |
|
|
Gentoo Linux Security Advisory
Title: PHP: Memory disclosure and arbitrary location file upload (GLSA 200410-04)
Severity: normal
Exploitable: remote
Date: October 06, 2004
Bug(s): #64223
ID: 200410-04
Synopsis
Two bugs in PHP may allow the disclosure of portions of memory and allow remote attackers to upload files to arbitrary locations.
Background
PHP is a general-purpose scripting language widely used to develop web-based applications. It can run inside a web server using the mod_php module or the CGI version of PHP, or can run stand-alone in a CLI.
Affected Packages
Package: dev-php/php
Vulnerable: < 4.3.9
Unaffected: >= 4.3.9
Architectures: All supported architectures
Package: dev-php/mod_php
Vulnerable: < 4.3.9
Unaffected: >= 4.3.9
Architectures: All supported architectures
Package: dev-php/php-cgi
Vulnerable: < 4.3.9
Unaffected: >= 4.3.9
Architectures: All supported architectures
Description
Stefano Di Paola discovered two bugs in PHP. The first is a parse error in php_variables.c that could allow a remote attacker to view the contents of the target machine's memory. Additionally, an array processing error in the SAPI_POST_HANDLER_FUNC() function inside rfc1867.c could lead to the $_FILES array being overwritten.
Impact
A remote attacker could exploit the first vulnerability to view memory contents. On a server with a script that provides file uploads, an attacker could exploit the second vulnerability to upload files to an arbitrary location. On systems where the HTTP server is allowed to write in a HTTP-accessible location, this could lead to remote execution of arbitrary commands with the rights of the HTTP server.
Workaround
There is no known workaround at this time.
Resolution
All PHP, mod_php and php-cgi users should upgrade to the latest stable version: Code: | # emerge sync
# emerge -pv ">=dev-php/php-4.3.9"
# emerge ">=dev-php/php-4.3.9"
# emerge -pv ">=dev-php/mod_php-4.3.9"
# emerge ">=dev-php/mod_php-4.3.9"
# emerge -pv ">=dev-php/php-cgi-4.3.9"
# emerge ">=dev-php/php-cgi-4.3.9" |
References
Secunia Advisory
BugTraq post regarding the php_variables.c issue
BugTraq post regarding the rfc1867.c issue
Last edited by GLSA on Sat Aug 23, 2008 4:17 am; edited 5 times in total |
|