<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snuffleupagus/src, branch master</title>
<subtitle>Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest! 
</subtitle>
<id>http://git.dustri.org/snuffleupagus/atom?h=master</id>
<link rel='self' href='http://git.dustri.org/snuffleupagus/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/'/>
<updated>2026-05-10T18:52:21Z</updated>
<entry>
<title>Fix phpinfo() reporting "enabled" when no config is loaded</title>
<updated>2026-05-10T18:52:21Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-10T18:49:59Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=0c8621011f19c4108bece995ab60f675a60990c4'/>
<id>urn:sha1:0c8621011f19c4108bece995ab60f675a60990c4</id>
<content type='text'>
SP_CONFIG_NONE is -1, which is truthy in C. The ternary
`SPG(is_config_valid) ? "enabled" : "disabled"` incorrectly
reported "enabled" for the no-config case. Use an explicit
comparison against SP_CONFIG_VALID instead.
</content>
</entry>
<entry>
<title>Fix a memory leak</title>
<updated>2026-05-10T10:56:19Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-10T10:56:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=996c461460b331557bc47a310a09a2337469745a'/>
<id>urn:sha1:996c461460b331557bc47a310a09a2337469745a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't free things in a fork failure</title>
<updated>2026-05-10T10:24:20Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-10T10:24:20Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=ffd6b991ce35cd03571dabd5efbc97f5e0b891ff'/>
<id>urn:sha1:ffd6b991ce35cd03571dabd5efbc97f5e0b891ff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Wait on a pid instead of on all children in upload_validation</title>
<updated>2026-05-10T10:04:35Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-10T10:04:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=0028420125e3a149bc2099c52f31d0345619e580'/>
<id>urn:sha1:0028420125e3a149bc2099c52f31d0345619e580</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a wrong use of strtok_r</title>
<updated>2026-05-10T09:55:55Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-10T09:55:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=6bd0bafd0d2a28666be39511143b7928123da09c'/>
<id>urn:sha1:6bd0bafd0d2a28666be39511143b7928123da09c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Prevent opcache from inlining functions with return-value rules on PHP 8.5+</title>
<updated>2026-05-09T23:06:20Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-09T22:09:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=7d8180a29b2ac45ef1814a7a2cad8e4da937ac76'/>
<id>urn:sha1:7d8180a29b2ac45ef1814a7a2cad8e4da937ac76</id>
<content type='text'>
PHP 8.5's opcache optimizer can inline trivial user functions (constant
return values), completely eliminating the DO_UCALL opcode. When this
happens, zend_execute_ex is never invoked and snuffleupagus's
return-value monitoring hooks never fire.

Fix this by setting ZEND_ACC_HAS_TYPE_HINTS on monitored functions'
op_arrays during compilation (via sp_op_array_handler). This flag is
checked by opcache's zend_try_inline_call() and prevents inlining.
For 0-arg functions — the only ones eligible for inlining — there are
no RECV opcodes, so the runtime impact is zero.

To enable sp_op_array_handler when return-value rules are configured,
the extension now registers itself as a zend extension and sets
ZEND_COMPILE_HANDLE_OP_ARRAY (previously only done for global_strict).

The disabled_function_echo_2 test is updated to use separate echo
statements and opcache.optimization_level=0, since opcache's echo
merging is a compile-time string concatenation that cannot be prevented
per-function.

This is a bit ugly, but it's the less awful solution to be able to hook return
values.
</content>
</entry>
<entry>
<title>Reduce the lifetime of cryptographic material</title>
<updated>2026-04-24T10:17:05Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-04-24T10:17:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=5f53903197021fcc8332a7f44c29fbea8d2c2060'/>
<id>urn:sha1:5f53903197021fcc8332a7f44c29fbea8d2c2060</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a possible null-deref in sp_stream_wrapper_register</title>
<updated>2026-04-24T10:15:45Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-04-24T10:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=138e97baf135fb0ae765d8899f564d6b10211830'/>
<id>urn:sha1:138e97baf135fb0ae765d8899f564d6b10211830</id>
<content type='text'>
`protocol_name` can be NULL if `zend_parse_parameters_ex` fails (it uses
`ZEND_PARSE_PARAMS_QUIET`), but it was then unconditionally passed to
`strcasecmp`.
</content>
</entry>
<entry>
<title>Fix an spprintf undefined behaviour</title>
<updated>2026-04-24T10:14:01Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-04-24T10:14:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=314b10154495b91eca684124275407b8186bb762'/>
<id>urn:sha1:314b10154495b91eca684124275407b8186bb762</id>
<content type='text'>
`getenv("REMOTE_ADDR")` can return NULL, and it is passed directly to
`spprintf`. While `spprintf` might handle `NULL` gracefully, it's not always
the case.
</content>
</entry>
<entry>
<title>Fix a memory leak in sp_log_disable/sp_log_disable_ret</title>
<updated>2026-04-24T09:50:40Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-04-24T09:50:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=36179282f5f52a7e54be34964b4afd4fd0194e4f'/>
<id>urn:sha1:36179282f5f52a7e54be34964b4afd4fd0194e4f</id>
<content type='text'>
php_raw_url_encode returned a new zend_string, but the old arg_value_dup is
never released. Also arg_value_dup was reassigned, leaking the initial
zend_string_init allocation.
</content>
</entry>
</feed>
