php-src/sapi
Arnaud Le Blanc c561f7da85
Refresh zend_mm shadow key on fork
The shadow key is refreshed when resetting the memory manager between two
requests. But in forking SAPIs the first request of a child process inherits the
shadow key of the parent. As a result, a leak of the shadow key during the first
request of one process gives away the shadow key used during the first request
of other processes. This makes the key refresh mechanism less useful.

Here I ensure that we refresh the shadow key after a fork. We can not reset the
manager as there may be active allocations. Instead, we have to recompute shadow
pointers with the new key.

Closes GH-16765
2025-07-29 14:00:37 +02:00
..
apache2handler Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
cgi Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
cli Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
embed Merge branch 'PHP-8.3' into PHP-8.4 2025-03-12 08:58:54 +01:00
fpm Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
fuzzer Make OPcache non-optional 2025-07-27 09:40:22 +02:00
litespeed Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
phpdbg Merge branch 'PHP-8.4' 2025-07-07 09:52:51 +02:00