[php-src] PR #22263: Zend: Fix type confusion in Exception::getTraceAsString().
| From: | devnexen | Date: | Tue, 09 Jun 2026 15:06:23 +0000 |
| Subject: | [php-src] PR #22263: Zend: Fix type confusion in Exception::getTraceAsString(). | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36353@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22263
Author: devnexen
A crafted, deliberately truncated unserialize() payload can leave Exception::$trace holding a
non-array value, since the typed-property check is skipped on the parse failure path.
getTraceAsString() then reinterpreted the object as a HashTable, causing an out-of-bounds read.
Guard against a non-array trace and return an empty string instead.
Fix #222257