Re: Win32 pre-Beta 4 NT version - important bug (at least I think so!)

From: Date: Sun, 13 Feb 2000 22:30:24 +0000
Subject: Re: Win32 pre-Beta 4 NT version - important bug (at least I think so!)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-15503@lists.php.net to get a copy of this message
At 20:28 13/02/2000 , Phil Driscoll wrote:
Just installed the pre-beta 4 version on NT4 SP4 IIS4 MySQL setup. The main bug that was preventing me from using beta 3 in a production environment was bug #3041 where posting more than about 4K of data causes the server to hang. The problem is still there, and I would have thought that it would affect almost all users of php on NT - even if you are only expecting small posts, there is nothing to stop a malicious user sending a big one to bring your server down. Anton Kalmykov (anton@concord.ru) has investigated the cause of the problem and has localised it to a call to erealloc. Apparently, the post reader function reads the post data in 4k blocks. The first block gets read in ok, but when 4k has been read and the data buffer is reallocated to increase its size by another 4k, the pointer to the buffer has changed and the post reader function hangs. Anton has compiled a 'work around' version which just increases the block size to 100K so that posts smaller than that work ok, but it is still easy, particularly with file uploads, to exceed that and bring the server down. I am happy to help with any testing if someone can work out where the pointer is getting corrupted.
I just tried the ISAPI module with several setups and POSTs. I tried both the 4,000 SAPI POST block size, and a tiny block size of 10 bytes. Both worked flawlessly with POST sizes ranging from 5 to 30K bytes. I'm really not sure what's going on on your machine. Do you have a debugger? Can you attach to inetinfo.exe and see exactly what's going on? Two important questions: 1. Are you using standard POST or multipart (file upload)? It actually uses the same read code, but I'd still like to know (if it crashes on both or just one of them). 2. Does it crash regardless of the script? If you post to an empty script, would it still crash? Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#15503) next »