[php-src] master: Fix tempnam() not being disabled in the fuzzer SAPI (#24719)
| From: | Yuma Kakei via GitHub | Date: | Mon, 26 Oct 2026 17:55:09 +0000 |
| Subject: | [php-src] master: Fix tempnam() not being disabled in the fuzzer SAPI (#24719) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142752@lists.php.net to get a copy of this message | ||
Author: Yuma Kakei (yumasansansan)
Committer: GitHub (web-flow)
Pusher: ndossche
Date: 2026-10-26T18:55:05+01:00
Commit: https://github.com/php/php-src/commit/6e215f882e3e1d25614f73da63fbffab7def0e99
Raw diff: https://github.com/php/php-src/commit/6e215f882e3e1d25614f73da63fbffab7def0e99.diff
Fix tempnam() not being disabled in the fuzzer SAPI (#24719)
The disable_functions list contains "tempname", which does not exist,
so tempnam() stays available and fuzz inputs can create files in /tmp.
Changed paths:
M sapi/fuzzer/fuzzer-sapi.c
Diff:
diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c
index b36f74ec0951..53172cc7b267 100644
--- a/sapi/fuzzer/fuzzer-sapi.c
+++ b/sapi/fuzzer/fuzzer-sapi.c
@@ -46,7 +46,7 @@ static const char HARDCODED_INI[] =
"disable_functions=dl,mail,mb_send_mail,set_error_handler"
",shell_exec,exec,system,proc_open,popen,passthru,pcntl_exec"
",chdir,chgrp,chmod,chown,copy,file_put_contents,lchgrp,lchown,link,mkdir"
- ",move_uploaded_file,rename,rmdir,symlink,tempname,touch,unlink,fopen"
+ ",move_uploaded_file,rename,rmdir,symlink,tempnam,touch,unlink,fopen"
/* Networking code likes to wait and wait. */
",fsockopen,pfsockopen"
",stream_socket_pair,stream_socket_client,stream_socket_server"