ID:               45901
 Updated by:       [EMAIL PROTECTED]
 Reported By:      aragon at phat dot za dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         WDDX related
 Operating System: FreeBSD 7.0-STABLE
 PHP Version:      5.2.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:
------------------------------------------------------------------------

[2008-08-24 04:54:12] aragon at phat dot za dot net

Description:
------------
If wddx_serialize_value is called on a SimpleXMLElement object that has
at least one child, the PHP script enters an infinite loop consuming
full CPU and allocating memory until the memory size limit is reached,
after which the script dies.


Reproduce code:
---------------
<?

$xml = new SimpleXMLElement('<data></data>');
$xml->addChild('test');
echo wddx_serialize_value($xml, 'Variables');
echo 'hello world';

?>


Expected result:
----------------
To see the WDDX output and 'hello world' :)

Actual result:
--------------
Potential DoS against web server and this log entry:

[Sun Aug 24 06:44:19 2008] [error] [client 127.0.0.1] PHP Fatal error: 
Allowed memory size of 134217728 bytes exhausted (tried to allocate
133955606 bytes) in /usr/home/aragon/dev/admin.infinite/test.php on line
5



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45901&edit=1

Reply via email to