mirror of
https://github.com/php/php-src.git
synced 2026-10-28 09:46:46 +08:00
- Replace bailout on OOM with UnwindExit - Properly reset various globals that may be accessed during startup Fix GHSA-w8hw-w9fx-j79w (CVE-2026-109618) Fix GHSA-6wmf-4rv5-p3rp (CVE-2026-109619) Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Jakub Zelenka <bukka@php.net> Co-authored-by: Nora Dossche <7771979+ndossche@users.noreply.github.com> Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
20 lines
552 B
PHP
20 lines
552 B
PHP
--TEST--
|
|
OOM unserialize() classname (2)
|
|
--INI--
|
|
memory_limit=200M
|
|
error_reporting=E_ALL&~E_DEPRECATED
|
|
--FILE--
|
|
<?php
|
|
|
|
// Use a classname with uppercase chars, so a lowercase copy is needed. We OOM
|
|
// while creating the copy.
|
|
$classname = str_repeat('A', 32*1024*1024);
|
|
$payload = 'O:'.strlen($classname).':"'.$classname.'":0:{}';
|
|
|
|
ini_set('memory_limit', memory_get_usage() + 40*1024*1024);
|
|
var_dump(gettype(unserialize($payload)));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Allowed memory size of %d bytes exhausted %S(tried to allocate %d bytes) in %s on line 9
|