#45901 [Opn->Fbk]: wddx_serialize_value crash with SimpleXMLElement object

From: Date: Tue, 26 Aug 2008 22:33:48 +0000
Subject: #45901 [Opn->Fbk]: wddx_serialize_value crash with SimpleXMLElement object
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128441@lists.php.net to get a copy of this message
ID: 45901 Updated by: jani@php.net 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

« previous php.bugs (#128441) next »