Bug #61143 [Fbk->Csd]: XML Parser segfaults on large xml
| From: | seth dot mos at dds dot nl | Date: | Mon, 27 Feb 2012 19:16:15 +0000 |
| Subject: | Bug #61143 [Fbk->Csd]: XML Parser segfaults on large xml | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167899@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61143&edit=1
ID: 61143
User updated by: seth dot mos at dds dot nl
Reported by: seth dot mos at dds dot nl
Summary: XML Parser segfaults on large xml
-Status: Feedback
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: FreeBSD 8.3
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
Just confirmed that disabling the Suhosin extension in our PHP 5.3.10 build succesfully resolves the
crash.
We will take this up with the Suhosin maintainers.
Kind regards,
Previous Comments:
------------------------------------------------------------------------
[2012-02-20 17:50:08] rasmus@php.net
I tried to reproduce this crash with the provided files on both Linux and FreeBSD
and was unable to. We'll need more information. Could you get a backtrace for us?
And second, could you try it without Suhosin enabled?
------------------------------------------------------------------------
[2012-02-20 13:11:28] seth dot mos at dds dot nl
Description:
------------
Previously we used PHP 5.2.17 in pfSense 2.0 before we upgraded our build process to the current
5.3.10.
We use the suplied xml to PHP array function in pfSense to convert RRD files and add new fields to
RRD files.
Here is the PHP version that we use on pfSense.
[2.1-DEVELOPMENT][root@pfsense.localdomain]/root(1): php -v
PHP 5.3.10 with Suhosin-Patch (cgi-fcgi) (built: Feb 17 2012 14:05:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
$xml = file_get_contents("wan-traffic.rrd.old.xml");
$array = xml2array($xml, 1, "tag");
/* this ^^ causes a segfault */
Please see the complete code below and a test file to work on.
Test script:
---------------
PHP code that triggers our crash, please download the entire code and XML file from:
http://iserv.nl/files/pfsense/php/wan-traffic.rrd.old.xml
http://iserv.nl/files/pfsense/php/testscript.txt
Expected result:
----------------
Return a array of the XML data.
Actual result:
--------------
PHP core dumps with a signal 11.
http://iserv.nl/files/pfsense/php/php%20core%20dump%205.3.10%20freebsd%208.3.png
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61143&edit=1