[php-src] Issue #9951: Add a way to reserve shmop memory ids and prevent shmop_open (e.g. opcache's region)
| From: | TysonAndre | Date: | Mon, 14 Nov 2022 14:51:12 +0000 |
| Subject: | [php-src] Issue #9951: Add a way to reserve shmop memory ids and prevent shmop_open (e.g. opcache's region) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242822@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9951
Author: TysonAndre
### Description
https://github.com/php/php-src/blob/5a5037f223c887d09e3131b2124cd7ff5a50cca9/ext/opcache/shared_alloc_shm.c#L112
Related to https://github.com/php/php-src/issues/9944
Prevent accidentally or intentionally reading or writing to shared memory regions which would be
used by opcache, or other extensions such as APCu
A possible approach:
1. Add a helper method in
Zend/ directory to track ids used during module
initialization
2. Make the ext/shmop extension check if those ids were already used and treat it like a native
error code.