mirror of
https://github.com/php/php-src.git
synced 2025-01-06 02:43:34 +08:00
18 lines
460 B
PHP
18 lines
460 B
PHP
--TEST--
|
|
SPL: Bug #70155 Use After Free Vulnerability in unserialize() with SPLArrayObject
|
|
--FILE--
|
|
<?php
|
|
$inner = 'x:i:0;O:12:"DateInterval":1:{s:1:"y";i:3;};m:a:1:{i:0;R:2;}';
|
|
$exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}';
|
|
$data = unserialize($exploit);
|
|
|
|
var_dump($data);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught InvalidArgumentException: Overloaded object of type DateInterval is not compatible with ArrayObject in %s
|
|
Stack trace:
|
|
%s
|
|
%s
|
|
%s
|
|
%s
|