[26247] in bugtraq

home help back first fref pref prev next nref lref last post

PHP Resource Exhaustion Denial of Service

daemon@ATHENA.MIT.EDU (Matthew Murphy)
Mon Jul 22 12:06:27 2002

Message-ID: <000801c23058$442dc220$e62d1c41@kc.rr.com>
From: "Matthew Murphy" <mattmurphy@kc.rr.com>
To: "BugTraq" <bugtraq@securityfocus.com>,
        "SecurITeam News" <news@securiteam.com>,
        "Full Disclosure" <full-disclosure@lists.netsys.com>
Date: Sat, 20 Jul 2002 20:45:17 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

The PHP interpreter is a heavy-duty CGI EXE (or SAPI module, depending on
configuration) that implements an HTML-embedded script language.  A
vulnerability in PHP can be used to cause a denial of service in some cases.

PHP's install process on Apache requires a "/php/" alias to be created, as
it resolves CGI paths to a virtual.  (e.g, /php/php.exe not C:\php\php.exe).

To solve the obvious security vulnerability posed by allowing PHP to run
from the web, the development team added a cgi.force_redirect option that is
enabled by default in Apache.

However, regardless of the force_redirect value, it is still possible to
load the binary without a script path:

(e.g, http://localhost/php/php)

A problem exists in PHP; specifically, it does not terminate when given no
command-line arguments.  A consistent flow of requests like the above will
exhaust all resources for CGI/ASAPI on the server.

Exploit: http://www.murphy.101main.net/php-apache.c

I tried to make sure this would run on Linux/BSD, but no guarantees...
Compiles cleanly on WinMe with MSVC 6.0.


home help back first fref pref prev next nref lref last post