Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25309 invoked by uid 1010); 2 Jun 2004 13:48:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25285 invoked from network); 2 Jun 2004 13:48:18 -0000 Received: from unknown (HELO mail.tiscali.cz) (213.235.135.71) by pb1.pair.com with SMTP; 2 Jun 2004 13:48:18 -0000 Received: from wbp1 (213.235.190.116) by mail.tiscali.cz (6.7.021) id 40B1F786003A017B for internals@lists.php.net; Wed, 2 Jun 2004 15:48:17 +0200 Message-ID: <001201c448a8$4ba310e0$74beebd5@wbp1> To: Date: Wed, 2 Jun 2004 15:48:32 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01C448B9.0E613DE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: virtual(), an easy way to put Apache server in spirals down. From: ntpt@centrum.cz ("NTPT") ------=_NextPart_000_000F_01C448B9.0E613DE0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hi. I think following things may be a security risk in mod_php, maybe = allowing a DoS attak if your server users can use php engine for your = www pages. =20 If you make a file foo.php what contains function virtual(), pointing = to itself, ie virtual(foo.php) at least in php 4.3.2 an infinite lop occure, that eat up all the = memory and swap, eat all the resouces and script is terminated with : "failed to open stream: Limit of open files reached " and=20 Fatal error: Allowed memory size of 67108864 bytes exhausted at (null):0 = (tried to allocate 4260 bytes) in Unknown on line 0 =20 I suggest to add a check for maximum recursion level in virtual() if = possible and an appropriate directive into the php.ini file that can = set this recursion level. Regards, NTPT=20 PS: please execuse my bad english ------=_NextPart_000_000F_01C448B9.0E613DE0--