1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

15260 Commits

Author SHA1 Message Date
Calvin Buckley 9e111c1897 Fix skipif for mkfifo usage in gh20582.phpt (#20804)
Makes it like ext/standard/tests/file/filetype_variation.phpt; it's not
just Windows that can have a missing posix_mkfifo, but also a minimal
build, like the ones suggested that RMs test with (using --disable-all).

(cherry picked from commit bd484ed65f)
2026-01-13 12:00:21 -08:00
Bob Weinand f754ffa8b2 Fixed bug GH-20745 ("Casting out of range floats to int" applies to strings) (#20746)
This reverts the warning for float-strings, to whose it never should have been applied in the first place.
2025-12-29 21:29:08 +01:00
Niels Dossche 4ed8fce458 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20582: Heap Buffer Overflow in iptcembed
2025-12-26 22:44:35 +01:00
Niels Dossche 48b4289dff Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20582: Heap Buffer Overflow in iptcembed
2025-12-26 22:44:14 +01:00
Niels Dossche 99ed66b49f Fix GH-20582: Heap Buffer Overflow in iptcembed
If you can extend the file between the file size gathering (resulting in
a buffer allocation), and reading / writing to the file you can trigger a
TOC-TOU where you write out of bounds.
To solve this, add extra bound checks and make sure that write actions
always fail when going out of bounds.
The easiest way to trigger this is via a pipe, which is used in the
test, but it should be possible with a regular file and a quick race
condition as well.

Closes GH-20591.
2025-12-26 22:43:45 +01:00
Gina Peter Banyard 9de37a33a6 Merge branch 'PHP-8.4' into PHP-8.5 2025-12-25 19:43:44 +01:00
Gina Peter Banyard 20f9772063 ext/standard: Fix memory leak in mail() when header key is numeric
Closes GH-20776
2025-12-25 19:42:31 +01:00
Jakub Zelenka 5c0a6feca2 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update NEWS with info about security issues
  Fix GHSA-www2-q4fc-65wf
  Fix GHSA-h96m-rvf9-jgm2
  Fix GHSA-8xr5-qppj-gvwj: PDO quoting result null deref
  Fix GH-20584: Information Leak of Memory
2025-12-16 15:36:52 +01:00
Jakub Zelenka 633fb48fca Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update NEWS with info about security issues
  Fix GHSA-www2-q4fc-65wf
  Fix GHSA-h96m-rvf9-jgm2
  Fix GHSA-8xr5-qppj-gvwj: PDO quoting result null deref
  Fix GH-20584: Information Leak of Memory
2025-12-16 15:35:25 +01:00
Jakub Zelenka e776695abf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update NEWS with info about security issues
  Fix GHSA-www2-q4fc-65wf
  Fix GHSA-h96m-rvf9-jgm2
  Fix GHSA-8xr5-qppj-gvwj: PDO quoting result null deref
  Fix GH-20584: Information Leak of Memory
2025-12-16 15:34:19 +01:00
Jakub Zelenka 6e124d0df6 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update NEWS with info about security issues
  Fix GHSA-www2-q4fc-65wf
  Fix GHSA-h96m-rvf9-jgm2
  Fix GHSA-8xr5-qppj-gvwj: PDO quoting result null deref
  Fix GH-20584: Information Leak of Memory
2025-12-16 15:30:54 +01:00
Niels Dossche ed70b1ea43 Fix GHSA-www2-q4fc-65wf 2025-12-16 15:26:59 +01:00
Niels Dossche 8b801151bd Fix GHSA-h96m-rvf9-jgm2 2025-12-16 15:26:59 +01:00
Niels Dossche c5f28c7cf0 Fix GH-20584: Information Leak of Memory
The string added had uninitialized memory due to
php_read_stream_all_chunks() not moving the buffer position, resulting
in the same data always being overwritten instead of new data being
added to the end of the buffer.

This is backport as there is a security impact as described in
GHSA-3237-qqm7-mfv7 .
2025-12-16 15:26:58 +01:00
Niels Dossche 21fe7149e7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20695: Assertion failure in normalize_value() when parsing malformed INI input via parse_ini_string()
2025-12-15 22:47:07 +01:00
Niels Dossche 9cf6f87529 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20695: Assertion failure in normalize_value() when parsing malformed INI input via parse_ini_string()
2025-12-15 22:46:52 +01:00
Niels Dossche 85cb6e421a Fix GH-20695: Assertion failure in normalize_value() when parsing malformed INI input via parse_ini_string()
I think there's simply a reasoning error about when which scanner state
can cause which parser component to invoke later on.

Closes GH-20702.
2025-12-15 22:46:27 +01:00
Niels Dossche 1172147855 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  standard: Fix error check for proc_open() command
2025-12-13 11:59:13 +01:00
Niels Dossche c1c3bcc46b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  standard: Fix error check for proc_open() command
2025-12-13 11:58:25 +01:00
Niels Dossche 038e53420b standard: Fix error check for proc_open() command
zval_get_string() can never return NULL, you need to use the try version
to get NULL. This is observable because the process will still spawn
even if an exception had occurred. To fix this, use the try variant.

Closes GH-20650.
2025-12-13 11:57:54 +01:00
Takuya Aramaki 5528df1a20 Fix TypeError message of setlocale() (#20625) 2025-12-06 18:06:19 +01:00
Ilija Tovilo f39ae2fc67 Fix warning on 8.5 2025-12-04 13:51:16 +01:00
Alexandre Daubois d74085bf8c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20370: forbid user stream filters to violate typed property constraints (#20373)
2025-12-04 09:11:52 +01:00
Alexandre Daubois 175548e868 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20370: forbid user stream filters to violate typed property constraints (#20373)
2025-12-04 09:11:09 +01:00
Alexandre Daubois 77f2d12849 Fix GH-20370: forbid user stream filters to violate typed property constraints (#20373) 2025-12-04 09:09:30 +01:00
Niels Dossche f622c3925b Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Tweak values for test on Windows (#20633)
2025-12-02 20:48:44 +01:00
Niels Dossche 881754ec1e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Tweak values for test on Windows (#20633)
2025-12-02 20:48:36 +01:00
Niels Dossche ad867ce651 Tweak values for test on Windows (#20633) 2025-12-02 20:48:24 +01:00
Niels Dossche 1279bc60e7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20584: Information Leak of Memory
  Fix GH-20583: Stack overflow in http_build_query via deep structures
2025-11-28 18:39:50 +01:00
Niels Dossche 159a75c93c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20584: Information Leak of Memory
  Fix GH-20583: Stack overflow in http_build_query via deep structures
2025-11-28 18:39:27 +01:00
Niels Dossche 8fe7930533 Fix GH-20584: Information Leak of Memory
The string added had uninitialized memory due to
php_read_stream_all_chunks() not moving the buffer position, resulting
in the same data always being overwritten instead of new data being
added to the end of the buffer.

Closes GH-20592.
2025-11-28 18:38:48 +01:00
Niels Dossche 292a7f73ba Fix GH-20583: Stack overflow in http_build_query via deep structures
Closes GH-20590.
2025-11-28 18:38:18 +01:00
Niels Dossche d13b5ebc08 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20286: use-after-destroy during userland stream_close()
2025-11-23 17:52:42 +01:00
Niels Dossche eb733a3127 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20286: use-after-destroy during userland stream_close()
2025-11-23 17:51:35 +01:00
Niels Dossche 27f17c3322 Fix GH-20286: use-after-destroy during userland stream_close()
Closes GH-20493.

Co-authored-by: David Carlier <devnexen@gmail.com>
2025-11-23 17:46:28 +01:00
Niels Dossche a0b918d3ee Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix memory leak in array_diff() with custom type checks
2025-11-08 22:42:26 +01:00
Niels Dossche 43b232a654 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in array_diff() with custom type checks
2025-11-08 22:42:11 +01:00
Niels Dossche 80b731659a Fix memory leak in array_diff() with custom type checks
Closes GH-20428.
2025-11-08 22:41:44 +01:00
Ilija Tovilo 106432852b Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:46 +01:00
Ilija Tovilo cbc3c1e03a Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:21 +01:00
Ilija Tovilo 4cfc729ac7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:14 +01:00
Ilija Tovilo 004a3985e7 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:08 +01:00
Ilija Tovilo c2f4508198 [skip ci] Avoid potential network port conflict in tests
These tests:

- ext/standard/tests/network/udp4loop.phpt
- ext/sockets/tests/socket_create_listen.phpt
- ext/sockets/tests/socket_create_listen-win32.phpt

all use port 31338. socket_create_listen.phpt and its win32 variant are mutually
exclusive, so they can't conflict. While udp4loop.phpt tries multiple ports, the
other tests do not. If udp4loop.phpt runs first and socket_create_listen.phpt
starts before it ends, the port is still blocked. Bump the start port for
udp4loop.phpt to avoid conflicts.
2025-11-05 12:29:31 +01:00
Niels Dossche 0b974dd663 Fix GH-20201: AVIF images misdetected as HEIF after introducing HEIF support in getimagesize()
Closes GH-20234.
2025-10-29 22:52:18 +01:00
Gina Peter Banyard 9a1b8a785d Fix GH-20194: null offset deprecation not emitted for writes (#20238)
Based on a patch from @ndossche
2025-10-29 18:36:10 +00:00
Ilija Tovilo 76e26c6c3c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Unparallelize imap
2025-10-28 00:49:32 +01:00
Ilija Tovilo fc1bc9c695 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Unparallelize imap
2025-10-28 00:49:26 +01:00
Ilija Tovilo 20654ce4c9 [skip ci] Unparallelize imap
It's removed for PHP 8.4 anyway, and still regularly causes "Mailbox already
exists" errors despite the flaky flag.
2025-10-28 00:48:19 +01:00
David Carlier d378dce3e9 Fix GH-20257: heap overflow on empty message in lf mode.
close GH-20258
2025-10-22 21:27:01 +01:00
Ilija Tovilo 9e9663782c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Improve bug60602.phpt portability
2025-10-20 17:31:53 +02:00