[php-src] PR #14882: Fix GH-14741: Segmentation fault in Zend/zend_types.h
| From: | nielsdos | Date: | Mon, 08 Jul 2024 22:14:39 +0000 |
| Subject: | [php-src] PR #14882: Fix GH-14741: Segmentation fault in Zend/zend_types.h | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27148@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14882
Author: nielsdos
The create_obj handler of InternalIterator is overwritten, but not the clone_obj handler. This is
not allowed.
In PHP 8.2 this didn't cause a segfault because the standard object handler was used for the
clone instead of the internal handler. So then it allocates and frees the object using the standard
object handlers. In 8.3 however, the object is created using the standard object handler and freed
using the custom handler, resulting in the buffer overflow. Even though bisect points to 1e1ea4f
this only reveals the bug.