1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

140153 Commits

Author SHA1 Message Date
Calvin Buckley
8bcf8ae1b3 Update NEWS for PHP 8.4.13 php-8.4.13 2025-09-23 11:14:32 -03:00
Calvin Buckley
3e1a564f92 Update versions for PHP 8.4.13 2025-09-23 11:14:07 -03:00
Alexandre Daubois
f9805eb14b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix intl tests naming (#19763)
2025-09-09 08:42:10 +02:00
Alexandre Daubois
b718514dc2 Fix memory leak when providing an invalid locale to IntlDateFormatter (#19764) 2025-09-09 08:41:32 +02:00
Alexandre Daubois
9eedf00206 Fix intl tests naming (#19763) 2025-09-09 08:41:20 +02:00
Niels Dossche
c395355728 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19752: Phar decompression with invalid extension can cause UAF
2025-09-08 23:11:01 +02:00
Niels Dossche
f6878b6ccf Fix GH-19752: Phar decompression with invalid extension can cause UAF
The rename code can error out prior to the reassignment of the filename,
which is why the test causes a crash.
The rename code can also error out at a later point,
which means it will have already assigned the new filename.
We detect in which case we are in and act accordingly.

Closes GH-19761.
2025-09-08 23:10:33 +02:00
Niels Dossche
89f2805905 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix OSS-Fuzz #385993744
2025-09-08 19:10:41 +02:00
Niels Dossche
ff84cb08ef Fix OSS-Fuzz #385993744
PSFS_FEED_ME is supposed to be returned when the filter did not receive
enough data and did not generate buckets for the output brigade.
The test generates buckets anyway on the output brigade, and the stream
layer did not handle that case causing a memory leak.
To solve this, discard any such buckets as it would conflict with the
status code returned by the filter. This keeps BC and solves the leak.

Closes GH-18972.
2025-09-08 19:10:22 +02:00
Niels Dossche
10a2a2a368 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak on failure in phar_convert_to_other()
  Fix metadata leak when phar convert logic fails
2025-09-08 19:06:37 +02:00
Niels Dossche
98bb934685 Fix memory leak on failure in phar_convert_to_other()
Closes GH-19755.
2025-09-08 19:06:11 +02:00
Niels Dossche
c50b37d231 Fix metadata leak when phar convert logic fails
Closes GH-19756.
2025-09-08 19:05:47 +02:00
Alexandre Daubois
cc4cfbf984 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-11952: better locale strings canonicalization for IntlDateFormatter and NumberFormatter (#19593)
2025-09-08 16:38:31 +02:00
Alexandre Daubois
6a2adcd8a4 Fix GH-11952: better locale strings canonicalization for IntlDateFormatter and NumberFormatter (#19593) 2025-09-08 16:36:27 +02:00
David Carlier
a0b7dab64b Merge branch 'PHP-8.3' into PHP-8.4 2025-09-07 18:19:08 +01:00
David Carlier
93865a4086 Fix GH-19578: imagefilledellipse underflow on width argument.
close GH-19579
2025-09-07 18:18:17 +01:00
Niels Dossche
3d52e925a1 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in phar tar temporary file error handling code
2025-09-07 13:05:07 +02:00
Niels Dossche
2f162214e8 Fix memory leak in phar tar temporary file error handling code
Closes GH-19740.
2025-09-07 13:04:19 +02:00
George Wang
1557bb81a9 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-06 12:47:20 -04:00
George Wang
ebbed484fb update LiteSpeed API to V8.3 2025-09-06 12:46:56 -04:00
George Wang
aa3983b31b fix pipe detection for STDERR. 2025-09-06 12:44:54 -04:00
Niels Dossche
f744c827a8 Fix GH-19706: dba stream resource mismanagement
This regressed in 8.4 when dba started mixing objects and resources
(streams).
The streams are first destroyed at a first step in shutdown, and in slow
shutdown then the symbol table is destroyed which destroys the dba
objects. The dba objects still use the streams but they have been
destroyed already, causing a UAF. Using dtor_obj instead of free_obj
would work around this but would cause issues like memory leaks because
dtor_obj may be skipped while free_obj may not be.
Instead, use the same solution as mysqlnd uses in that we fully manage
the stream lifecycle ourselves. This also avoids users from meddling
with the stream through get_resources().
This would be fixed 'automatically' in the future when we are using
objects for everything.

Closes GH-19710.
2025-09-06 00:08:15 +02:00
Niels Dossche
c58312462c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19720: Assertion failure when error handler throws when accessing a deprecated constant
2025-09-06 00:01:13 +02:00
Niels Dossche
9d69ab91ab Fix GH-19720: Assertion failure when error handler throws when accessing a deprecated constant
When deprecation causes an exception, we should return NULL instead of
continuing.

Closes GH-19723.
2025-09-06 00:00:52 +02:00
Niels Dossche
1b49d0eb58 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in zip when encountering empty glob result
2025-09-05 18:57:26 +02:00
Niels Dossche
216e87ad7e Fix memory leak in zip when encountering empty glob result
The case of returning 0 is inconsistent in when it returns an empty
array, furthermore the caller already returns an empty array.
Because the caller overwrites the return value in these cases, it can
cause a memory leak.

This is easier to trigger on master in some cases as different code paths
are taken with the new bundled glob. On some platforms it is also
triggerable on 8.3.

Closes GH-19715.
2025-09-05 18:56:27 +02:00
Alexandre Daubois
924eea45a8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NEWS entry order
2025-09-05 10:54:09 +02:00
Alexandre Daubois
0e668e517a Fix NEWS entry order 2025-09-05 10:53:22 +02:00
Alexandre Daubois
d84f463e3c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19461: Improve error message on listening error with IPv6 (#19462)
2025-09-05 10:50:11 +02:00
Alexandre Daubois
a41cb62c4c Fix GH-19461: Improve error message on listening error with IPv6 (#19462) 2025-09-05 10:48:33 +02:00
Remi Collet
578783b2cc Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS
2025-09-05 09:12:35 +02:00
Remi Collet
4ee90ea275 NEWS 2025-09-05 09:12:27 +02:00
Remi Collet
abbf84083a NEWS 2025-09-05 09:12:07 +02:00
Remi Collet
3a88977043 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19681 PHP_EXPAND_PATH broken with bash 5.3.0
2025-09-05 09:10:19 +02:00
Remi Collet
98d2b92324 Fix GH-19681 PHP_EXPAND_PATH broken with bash 5.3.0 2025-09-05 09:08:15 +02:00
Alexandre Daubois
f0c531597c Add NEWS missing entry 2025-09-05 08:23:57 +02:00
Alexandre Daubois
7cceda1597 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19577: avoid integer overflow when using a small offset and PHP_INT_MAX with LimitIterator (#19585)
2025-09-05 08:10:22 +02:00
Alexandre Daubois
05133ac962 Fix GH-19577: avoid integer overflow when using a small offset and PHP_INT_MAX with LimitIterator (#19585) 2025-09-05 08:09:06 +02:00
Niels Dossche
ad129c6f97 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata()
2025-09-04 23:13:45 +02:00
Niels Dossche
d10ff9bbd8 Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata()
This one is not initialized. This is not hittable from userspace code
because all locations within first-party php-src code have a valid
`option` argument.

Closes GH-19714.
2025-09-04 23:13:20 +02:00
Arnaud Le Blanc
d68fd7390d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Ensure that type widening converges
2025-09-04 09:14:31 +02:00
Arnaud Le Blanc
bd88a54934 Ensure that type widening converges
Range analysis may fail to converge (the process hangs) when the transfer
function zend_inference_calc_range produces a smaller range.

Fix by ensuring that the widening operator zend_inference_widening_meet
allows only widening. This matches the inference rules in figure 13 of the
paper.

Fixes GH-19679
Closes GH-19683
2025-09-04 08:58:06 +02:00
Niels Dossche
3023b29a11 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19612: Mitigate libxml2 tree dictionary bug
2025-09-03 21:58:16 +02:00
Niels Dossche
080fd14458 Fix GH-19612: Mitigate libxml2 tree dictionary bug
This code is very similar to code on PHP 8.4 and higher, but the
mitigation is extended to entity references and to attribute children.

Closes GH-19620.
2025-09-03 21:52:48 +02:00
Ilija Tovilo
e4c94829a2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Stale array iterator pointer
2025-09-03 18:15:35 +02:00
Ilija Tovilo
f9ce6d8f3a Stale array iterator pointer
Fixes GH-19613
Closes GH-19616
2025-09-03 18:14:43 +02:00
Ilija Tovilo
6f17c693ef Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix RC assertion in fpm when php_admin_value setting fails
2025-09-03 14:50:15 +02:00
Ilija Tovilo
15beb140e5 Fix RC assertion in fpm when php_admin_value setting fails
The value is temporarily duplicated. While the value is allocated persistently,
it will be freed if the ini value can't be set. This is safe, given the value
has not actually been stored.

Exposed by GH-19619
Closes GH-19671
2025-09-03 14:49:06 +02:00
Ilija Tovilo
73fc2db234 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix date_sunrise() and date_sunset() with partial-hour UTC offset
2025-09-03 13:35:04 +02:00
Ilija Tovilo
0ae9a58ade Fix date_sunrise() and date_sunset() with partial-hour UTC offset
See GH-19633
Closes GH-19672
2025-09-03 13:34:03 +02:00