[php-src] PR #14570: Disable ZEND_MM_CUSTOM by default.

From: Date: Fri, 14 Jun 2024 16:28:40 +0000
Subject: [php-src] PR #14570: Disable ZEND_MM_CUSTOM by default.
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-26682@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/14570 Author: jvoisin PHP's heap implementation is the one that virtually everybody uses: it's fast, it's there by default, it works, … The only major ever I've found of custom heap implementation [is phpdbg](https://github.com/rogercaetanos/php-src/blob/e39db5773d9443e2cfee92bc31651848c044c325/sapi/phpdbg/phpdbg.c#L968-L999) but it looks dispensable at best. Some other debuggers and profilers might use it, and that's alright, but I don't think that this feature should be enabled by default. Disabling ZEND_MM_CUSTOM will allow to save a couple of bytes (yay), but the main goal is to close a low-hanging exploitation vector: as [presented at OffensiveCon 2024](https://youtu.be/dqKFHjcK9hM?t=1622), having trivially callable writeable function pointers at the top of the heap makes it straightforward to turn a limited write into an arbitrary code execution. cc @arnaud-lb

« previous php.git-pulls (#26682) next »