6865 Commits
Author SHA1 Message Date
Yuma Kakei 2295a3504a Fuzz exif thumbnail handling (#24722)
exif_read_data() only reads the thumbnail if $read_thumbnail is true,
and exif_thumbnail() only scans the thumbnail for its dimensions if they
are requested, so the exif fuzzer never reached this code.
2026-10-28 08:13:49 +01:00
Maniix 2967edbbd4 Remove PIDFile from FPM service (#23671) 2026-10-27 18:58:24 +01:00
Jakub Zelenka d4eba0fff2 Merge branch 'PHP-8.6'
* PHP-8.6:
  fpm: fix _GET_str memory leaks and test headers_only status path
  fpm: fix a use-after-free of scoreboard_p
  fpm: fix potential null dereference in fpm_status_export_to_zval()

# Conflicts:
#	NEWS
2026-10-27 18:52:49 +01:00
Jakub Zelenka 2df07dd25e Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  fpm: fix _GET_str memory leaks and test headers_only status path
  fpm: fix a use-after-free of scoreboard_p
  fpm: fix potential null dereference in fpm_status_export_to_zval()
2026-10-27 18:52:12 +01:00
Jakub Zelenka 97fe7d69f6 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  fpm: fix _GET_str memory leaks and test headers_only status path
  fpm: fix a use-after-free of scoreboard_p
  fpm: fix potential null dereference in fpm_status_export_to_zval()
2026-10-27 18:52:11 +01:00
Marcel Hernandez 0e7e36c896 fpm: fix _GET_str memory leaks and test headers_only status path
Closes GH-23833
2026-10-27 18:50:07 +01:00
Marcel Hernandez 3aa4da4a20 fpm: fix a use-after-free of scoreboard_p 2026-10-27 18:49:55 +01:00
Marcel Hernandez ce3e1bac17 fpm: fix potential null dereference in fpm_status_export_to_zval() 2026-10-27 18:49:55 +01:00
Jakub Zelenka c5003a7b30 Merge branch 'PHP-8.6'
* PHP-8.6:
  Fix GH-24046: FPM worker stdio pipe fd closed twice

# Conflicts:
#	NEWS
2026-10-27 18:01:18 +01:00
Jakub Zelenka 1471453102 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Fix GH-24046: FPM worker stdio pipe fd closed twice

# Conflicts:
#	NEWS
2026-10-27 18:00:56 +01:00
Jakub Zelenka a5cb45ffa7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-24046: FPM worker stdio pipe fd closed twice
2026-10-27 18:00:25 +01:00
Ian P. Christianandndossche cd161267c0 Fix GH-24046: FPM worker stdio pipe fd closed twice
When a worker exits while one of its child processes still holds the
worker's stdout/stderr pipe open, the drain in fpm_child_close() gets
EAGAIN instead of EOF and leaves the fd open. fpm_child_close() then
closed the fd but kept its number in the child struct, so the postponed
free closed it (and removed its event) a second time. If a new worker
had been given the same fd number in the meantime, its pipe was closed
and every later write it made to stdio failed with EPIPE.

Remove the event and reset the fd to -1 when closing it in
fpm_child_close() so the postponed free cannot act on it again.

Closes GH-24056.

Co-authored-by: ndossche <7771979+ndossche@users.noreply.github.com>
2026-10-27 17:59:55 +01:00
Jakub Zelenka 1ed9d6acdf Merge branch 'PHP-8.6'
* PHP-8.6:
  Fix FPM worker output prefix longer than its buffer or log_limit
2026-10-27 17:08:05 +01:00
Jakub Zelenka 2bff391ff1 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Fix FPM worker output prefix longer than its buffer or log_limit
2026-10-27 17:07:16 +01:00
Jakub Zelenka 4d303daf07 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix FPM worker output prefix longer than its buffer or log_limit
2026-10-27 17:02:28 +01:00
Martin Mirchev 974de49381 Fix FPM worker output prefix longer than its buffer or log_limit
zlog_stream_set_msg_prefix() used the length returned by vsnprintf()
rather than what was written to its 512-byte buffer, so a long pool name
copied stack memory into the prefix. A prefix close to or above log_limit
also made the remaining line length underflow when the worker output was
logged, which crashed the master or made it write unbounded data.

Use only what was written and limit the prefix to half of log_limit. Also
clamp the formatted length in zlog_stream_vformat().

Closes GH-24541
2026-10-27 16:54:57 +01:00
Jakub Zelenka 593ed68ac9 Merge branch 'PHP-8.6'
* PHP-8.6:
  Add FPM test for INI diagnostics after fatal error with backtrace (#24638)
2026-10-27 10:41:09 +01:00
Jakub Zelenka c226a5931c Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Add FPM test for INI diagnostics after fatal error with backtrace (#24638)
2026-10-27 10:40:54 +01:00
aasulandaasim c9433e1ff1 Add FPM test for INI diagnostics after fatal error with backtrace (#24638)
Co-authored-by: aasim <aasulaiman@gmail.com>
2026-10-27 10:40:10 +01:00
Jakub Zelenka da7adb71e4 Merge branch 'PHP-8.6'
* PHP-8.6:
  Fix GH-24695: FPM tester sends signal to process group when PID is missing (#24698)
2026-10-27 10:15:25 +01:00
Jakub Zelenka 5fe484c018 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Fix GH-24695: FPM tester sends signal to process group when PID is missing (#24698)
2026-10-27 10:14:47 +01:00
Jakub Zelenka d8caef31da Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-24695: FPM tester sends signal to process group when PID is missing (#24698)
2026-10-27 10:14:12 +01:00
Lazizbek ErgashevandBill Sommerfeld 810ce5e5f6 Fix GH-24695: FPM tester sends signal to process group when PID is missing (#24698)
When FPM fails to start, getPid() reports the missing PID file and
returns 0, and signal() then runs kill -USR2 0. That signals the whole
process group and takes down run-tests.php along with the test. Now
signal() returns early in that case, so the test just fails and the run
keeps going.

Co-authored-by: Bill Sommerfeld <sommerfeld@hamachi.org>
2026-10-27 10:12:06 +01:00
Daniel Scherzer 3b8e98882e Merge branch 'PHP-8.6'
* PHP-8.6:
  LiteSpeed: document security considerations for executed paths (#24450)
2026-10-26 14:34:19 -07:00
Daniel Scherzer e5f67fb2da LiteSpeed: document security considerations for executed paths (#24450)
Make it clear that the `init_request_info()` function is indeed meant to be
using `LSAPI_GetScriptFileName()` without any validation, and document in the
README file that this lack of validation is another reason why only trusted
sources should be granted direct access to the listener.
2026-10-26 14:33:39 -07:00
ndossche 7d3a57a858 Merge branch 'PHP-8.6'
* PHP-8.6:
  Fix GH-24697: cli: passing PHP_HTTP_PARSER_STRICT build option doesn't work
2026-10-26 19:24:21 +01:00
ndossche aad2266262 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Fix GH-24697: cli: passing PHP_HTTP_PARSER_STRICT build option doesn't work
2026-10-26 19:24:16 +01:00
ndossche 61156b65c7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-24697: cli: passing PHP_HTTP_PARSER_STRICT build option doesn't work
2026-10-26 19:23:57 +01:00
ndosscheandDavid Carlier 470af312dd Fix GH-24697: cli: passing PHP_HTTP_PARSER_STRICT build option doesn't work
The default is non-strict, we need to keep the default for BC reasons.
We change the macro handling such that it can be enabled now, previously
it couldn't be enabled.

Closes GH-24704.

Co-authored-by: David Carlier <devnexen@gmail.com>
2026-10-26 19:23:38 +01:00
Yuma Kakei 6f6964b5b3 Fix JIT fuzzers never enabling the JIT (#24717)
Since the default of opcache.jit changed from "tracing" to "disable"
(c16ad918ba, RFC jit_config_defaults), JIT_G(enabled) is false after
startup and zend_jit_config() rejects every runtime change of
opcache.jit. The function-jit and tracing-jit fuzzers turn the JIT on
at runtime without checking the result, so since PHP 8.4 they have only
been running the VM. The OSS-Fuzz coverage report of 2026-10-24 shows
0.04% line coverage (40/103166) for ext/opcache/jit/.

Start with opcache.jit=off, which keeps the JIT available, and abort if
switching the JIT mode fails, so that this cannot regress silently.
2026-10-26 19:21:39 +01:00
Yuma Kakei 6e215f882e 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.
2026-10-26 18:55:05 +01:00
Ilia Alshanetsky c6de4e63c8 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  phpdbg: Backport watchpoint fixes to PHP-8.4
2026-10-24 18:19:43 -04:00
Ilia Alshanetsky 055e11e0c7 phpdbg: Backport watchpoint fixes to PHP-8.4
Backport 207dd1d23f and 250f138329 by Ilia Alshanetsky, and 9d6fd4fd98
by Arnaud Le Blanc. These fix watchpoint memory errors and allow watch_006
to run without an expected-failure marker on PHP-8.4 and PHP-8.5.

Fixes GH-24549
Closes GH-24655
2026-10-24 18:10:47 -04:00
Ilija Tovilo 9705fda1bb Merge branch 'PHP-8.6' into master
* PHP-8.6:
  Add NEWS entry
  Avoid state corruption via bailout
2026-10-21 16:34:56 +02:00
Ilija Tovilo d6373dfe15 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Add NEWS entry
  Avoid state corruption via bailout
2026-10-21 16:33:23 +02:00
Ilija Tovilo c7273b9ba8 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Add NEWS entry
  Avoid state corruption via bailout
2026-10-21 16:30:04 +02:00
Ilija Tovilo 8a94bb3822 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add NEWS entry
  Avoid state corruption via bailout
2026-10-21 16:27:03 +02:00
Ilija Tovilo c1a5f468d0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add NEWS entry
  Avoid state corruption via bailout
2026-10-21 16:12:35 +02:00
3584a98bda Avoid state corruption via bailout
- Replace bailout on OOM with UnwindExit
- Properly reset various globals that may be accessed during startup

Fix GHSA-w8hw-w9fx-j79w (CVE-2026-109618)
Fix GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: Jakub Zelenka <bukka@php.net>
Co-authored-by: Nora Dossche <7771979+ndossche@users.noreply.github.com>
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
2026-10-21 16:06:22 +02:00
Daniel Scherzer 1979890d21 Merge branch 'PHP-8.6'
* PHP-8.6:
  SoapClient: add new `keep_headers` option
  ext/soap: redact more sensitive headers
  `sdl_set_uri_credentials()`: use early returns to improve readability
  GH-23686: Add regression tests for sensitive headers
2026-10-19 15:34:13 -07:00
Daniel Scherzer 1e8e679dd4 GH-23686: Add regression tests for sensitive headers 2026-10-19 14:33:07 -07:00
Daniel Scherzer 2cd89ebb07 Merge branch 'PHP-8.6'
* PHP-8.6:
  LiteSpeed: document security considerations for INI overrides (#23806)
2026-10-19 13:40:48 -07:00
Daniel Scherzer 4c6bf5fcce LiteSpeed: document security considerations for INI overrides (#23806)
Make it clear that the `alter_ini()` function is indeed meant to be operating
at the `ZEND_INI_SYSTEM` level, and document in the README file that only
trusted sources should be granted direct access to the listener.
2026-10-19 13:40:09 -07:00
Arnaud Le Blanc 0c4b6bd2ee Merge branch 'PHP-8.6'
* PHP-8.6:
  fix GH-24262: default apache build to global-dynamic TLS (#24301)
2026-10-19 12:20:19 +02:00
Marc a0d15e54a2 fix GH-24262: default apache build to global-dynamic TLS (#24301) 2026-10-19 12:19:51 +02:00
Arnaud Le Blanc 090c7c10e5 Merge branch 'PHP-8.6'
* PHP-8.6:
  Fix -Wint-to-pointer-cast warnings in the CALL VM on 32-bit (#24360)
2026-10-19 11:43:52 +02:00
Arnaud Le Blanc 5089b1c4e8 Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Fix -Wint-to-pointer-cast warnings in the CALL VM on 32-bit (#24360)
2026-10-19 11:43:42 +02:00
Marc Bennewitz 4bb88e0367 Fix -Wint-to-pointer-cast warnings in the CALL VM on 32-bit (#24360)
ZEND_VM_ENTER_BIT tags the opline returned by CALL VM handlers. It is
1ULL so that ~ZEND_VM_ENTER_BIT keeps the upper half of 64-bit pointers,
but on 32-bit platforms it widens the tagged pointer expressions to
64 bits, and casting those back to a pointer warns. This breaks
--enable-werror builds where no global VM registers are used, e.g. arm32,
or i386 with --disable-gcc-global-regs.

Use (uintptr_t)1 instead, which is exactly pointer-sized everywhere, also
in the copies of the definition in the JIT and the fuzzer SAPI.
2026-10-19 11:43:04 +02:00
Gina Peter Banyard c43f5a60b3 Merge branch 'PHP-8.6'
* PHP-8.6:
  Update NEWS
  ext/standard/tests: work around Windows quoting with tempfiles.
  .github/scripts/windows: pass an extension_dir to the test runner.
  {ext/standard,sapi/cli}/tests: pass TEST_PHP_EXTRA_ARGS to php
  ext/standard/tests: pass TEST_PHP_EXTRA_ARGS to some proc_open() tests
  sapi/cli/tests/023.phpt: support TEST_PHP_EXTRA_ARGS
  std: Fix memory leak of the last response headers after a nested HTTP request (#24201)
  Fiber: hold the object a callable resolved to in the creating frame (#24134)
2026-10-14 18:43:58 +01:00
Gina Peter Banyard 3e458e5fdc Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
  Update NEWS
  ext/standard/tests: work around Windows quoting with tempfiles.
  .github/scripts/windows: pass an extension_dir to the test runner.
  {ext/standard,sapi/cli}/tests: pass TEST_PHP_EXTRA_ARGS to php
  ext/standard/tests: pass TEST_PHP_EXTRA_ARGS to some proc_open() tests
  sapi/cli/tests/023.phpt: support TEST_PHP_EXTRA_ARGS
  std: Fix memory leak of the last response headers after a nested HTTP request (#24201)
  Fiber: hold the object a callable resolved to in the creating frame (#24134)
2026-10-14 18:43:37 +01:00