Bug #67072 [NEW]: Echoing unserialized "SplFileObject" crash

From: Date: Mon, 14 Apr 2014 04:22:33 +0000
Subject: Bug #67072 [NEW]: Echoing unserialized "SplFileObject" crash
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185237@lists.php.net to get a copy of this message
From:             arteau dot olivier at gmail dot com
Operating system: Windows / Linux
PHP version:      5.5.11
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Echoing unserialized "SplFileObject" crash

Description:
------------
Executing the script below crashes PHP.

Some quick debugging on my part seems to point to a NULL dereference bug
in the spl related code. However, since I was debugging from the binary
it's hard to tell where exactly in the code it is.

Test script:
---------------
<?php
   echo
unserialize('O:13:"SplFileObject":1:{s:9:"*filename";s:15:"/home/flag/flag";}');
?>

Expected result:
----------------
Since "SplFileObject" aren't serializable, an exception should be thrown
or bool(false) should be returned.

Actual result:
--------------
PHP crash.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=67072&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=67072&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=67072&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=67072&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=67072&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=67072&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=67072&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=67072&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=67072&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=67072&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=67072&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=67072&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=67072&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=67072&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67072&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=67072&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=67072&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=67072&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67072&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=67072&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=67072&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#185237) next »