[GIT-PULLS] [php-src] PR #23456: Fix GH-23453: bad free with a context engine ID longer than 32 bytes
[email protected] (lazerg)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <jS4PzCfOcidqxdwVZrqIQTiC4z4CIVuj0xiSefatMIQ@main.internal.php.net> |
Pull Request: https://github.com/php/php-src/pull/23456 Author: lazerg `netsnmp_session_set_contextEngineID()` passes an emalloc()'d buffer to `snmp_hex_to_binary()` with `allow_realloc` set. A context engine ID longer than the 32-byte buffer makes net-snmp call `snmp_realloc()` on that pointer, which aborts the process. RFC 3411 caps the engine ID at 32 bytes anyway, so this drops `allow_realloc`: an oversized value now hits the existing "Bad engine ID value" warning and returns false. Fixes GH-23453.