Bug #79880 [NEW]: Fatal error: Uncaught Error: Invalid serialization data for DateTime object
| From: | isharafa at unb dot ca | Date: | Tue, 21 Jul 2020 22:10:59 +0000 |
| Subject: | Bug #79880 [NEW]: Fatal error: Uncaught Error: Invalid serialization data for DateTime object | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228165@lists.php.net to get a copy of this message | ||
From: isharafa at unb dot ca
Operating system: Ubuntu
PHP version: 7.4.8
Package: *Programming Data Structures
Bug Type: Bug
Bug description:Fatal error: Uncaught Error: Invalid serialization data for DateTime object
Description:
------------
I was fuzzing PHP to find a bug in unserialize function and I got the
following bug:
Stack trace:
#0 [internal function]: DateTime->__wakeup()
#1 Command line code(1): unserialize('O:8:"DateTime":...')
#2 {main}
thrown in Command line code on line 1
You can reproduce that using the following command.
echo -ne
'O:8:"DateTime":3:{s:4:"date";s:26:"2fe";01-one";s:10"Z.012345";s:13:"timezone_type";i:2;s:8:"timezone";s:1:"Z";}'
| ./sapi/cli/php -r 'unserialize(file_get_contents("php://stdin"));'
Test script:
---------------
echo -ne
'O:8:"DateTime":3:{s:4:"date";s:26:"2fe";01-one";s:10"Z.012345";s:13:"timezone_type";i:2;s:8:"timezone";s:1:"Z";}'
| ./sapi/cli/php -r 'unserialize(file_get_contents("php://stdin"));'
--
Edit bug report at https://bugs.php.net/bug.php?id=79880&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79880&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79880&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79880&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79880&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79880&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79880&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79880&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79880&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79880&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79880&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79880&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79880&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79880&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79880&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79880&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79880&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79880&r=mysqlcfg