php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36350 php 4.4.2 remote fopen php4ts access violation crash
Submitted: 2006-02-10 12:54 UTC Modified: 2006-02-10 14:53 UTC
From: valexa at nextcode dot org Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.4.2 OS: Windows NT 2k/xp
Private report: No CVE-ID: None
 [2006-02-10 12:54 UTC] valexa at nextcode dot org
Description:
------------
How i tested :
tested on win200 and winxp , official binary releases virgin unmodified , 
tested also with no extensions loaded , same behaviour , 
tested also with the 4.4.1 php4ts.dll on 4.4.2 , no crash

Upon running any php script that reads a url/remote file i get a crash in php 4.4.2

The instruction at "0x100c5fca" referenced memory at "0x00000035". The memory could not be "read".

Unhandled exception in php.exe (PHP4TS.DLL): 0xC0000005: Access Violation.

assembly dump folows 

100C5FAB   mov         eax,dword ptr [esi+8]
100C5FAE   or          eax,80000000h
100C5FB3   mov         dword ptr [esi+8],eax
100C5FB6   pop         esi
100C5FB7   ret
100C5FB8   mov         eax,[10161E18]
100C5FBD   test        eax,eax
100C5FBF   je          100C5FC3
100C5FC1   call        eax
100C5FC3   mov         edx,dword ptr [edi]
100C5FC5   mov         eax,[10161D8C]
100C5FCA   mov         eax,dword ptr [edx+eax*4-4] <<<<-crashes here 
100C5FCE   cmp         esi,dword ptr [eax]
100C5FD0   jne         100C5FD8
100C5FD2   mov         ecx,dword ptr [esi]
100C5FD4   mov         dword ptr [eax],ecx
100C5FD6   jmp         100C5FDF
100C5FD8   mov         edx,dword ptr [esi+4]
100C5FDB   mov         eax,dword ptr [esi]
100C5FDD   mov         dword ptr [edx],eax
100C5FDF   mov         eax,dword ptr [esi]
100C5FE1   test        eax,eax
100C5FE3   je          100C5FEB


Reproduce code:
---------------
<html>
<?php
echo "crash now";
$available = file ('http://www.php.net/downloads.php');
echo "hadn't crashed";
?>
</html>

Expected result:
----------------
C:\php-4.4.1-Win32>php bug.php
X-Powered-By: PHP/4.4.1
Content-type: text/html

</html>
crash nowhadn't crashed</html>
C:\php-4.4.1-Win32>


Actual result:
--------------
C:\php-4.4.2-Win32>php bug.php
X-Powered-By: PHP/4.4.2
Content-type: text/html

</html>
crash now
C:\php-4.4.2-Win32>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-10 14:53 UTC] valexa at nextcode dot org
with latest stable bug can not be replicated
seems like it is fixed but the PHP Quality Assurance Team goofed big time on php 4.4.2

C:\php4-win32-STABLE-latest>php bug.php
X-Powered-By: PHP/4.4.3-dev
Content-type: text/html

<html>
crash nowhadn't crashed</html>
C:\php4-win32-STABLE-latest>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC