[php-src] Issue #22516: zend_alloc bin 0 may leak
| From: | ndossche | Date: | Mon, 29 Jun 2026 22:01:19 +0000 |
| Subject: | [php-src] Issue #22516: zend_alloc bin 0 may leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252308@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22516
Author: ndossche
### Description
Value set analysis shows that
ZEND_MM_SRUN_FREE_COUNTER macro can return a value in the
interval [0, 511].
However, bin 0 from ZEND_MM_BINS_INFO has 512 free elements.
So the following check cannot fire:
https://github.com/php/php-src/blob/c1a6258015eca9e3edb768114d13db954ce77a65/Zend/zend_alloc.c#L2196
Found using SAST.
### PHP Version
```plain
master
```
### Operating System
_No response_