[php-src] PR #22379: ext/sockets: bound interface name copy in from_zval_write_ifindex()

From: Date: Sun, 21 Jun 2026 11:03:22 +0000
Subject: [php-src] PR #22379: ext/sockets: bound interface name copy in from_zval_write_ifindex()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36526@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22379 Author: iliaal The SIOCGIFINDEX fallback checks the interface-name length against sizeof(ifr.ifr_name) but does not return on overflow, then memcpy's ZSTR_LEN+1 bytes into the fixed ifr_name buffer, overrunning the stack. This is a master-only regression from 3e9b530d625, which replaced the original bounded strlcpy with an unguarded memcpy. Restore the strlcpy plus else-if guard that PHP-8.4 and PHP-8.5 still have.

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