1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 20:22:36 +02:00
Commit Graph

131998 Commits

Author SHA1 Message Date
Pierrick Charron
12ccdff196 Update versions for PHP 8.2.24 php-8.2.24 2024-09-24 18:12:40 -04:00
Jakub Zelenka
39fe111e3b [skip ci] Fix typo in NEWS
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-09-23 20:52:56 +01:00
Jakub Zelenka
c70e256308 Skip GHSA-9pqp-7h25-4f32 test on Windows 2024-09-23 18:55:14 +01:00
Jakub Zelenka
c4d7f1b43d Update NEWS with security fixes info 2024-09-23 12:09:34 +01:00
Jakub Zelenka
1f8e16172c Fix GHSA-865w-9rf3-2wh5: FPM: Logs from childrens may be altered 2024-09-23 11:43:56 +01:00
Niels Dossche
48808d98f4 Fix GHSA-94p6-54jq-9mwp
Apache only generates REDIRECT_STATUS, so explicitly check for that
if the server name is Apache, don't allow other variable names.
Furthermore, redirect.so and Netscape no longer exist, so
remove those entries as we can't check their server name anymore.

We now also check for the configuration override *first* such that it
always take precedence. This would allow for a mitigation path if
something like this happens in the future.
2024-09-23 11:43:45 +01:00
Niels Dossche
abcfd980bf Fix GHSA-p99j-rfp4-xqvq
It's no use trying to work around whatever the operating system and Apache
do because we'll be fighting that until eternity.
Change the skip_getopt condition such that when we're running in
CGI or FastCGI mode we always skip the argument parsing.
This is a BC break, but this seems to be the only way to get rid of this
class of issues.
2024-09-23 11:43:35 +01:00
Arnaud Le Blanc
19b49258d0 Fix GHSA-9pqp-7h25-4f32
multipart/form-data boundaries larger than the read buffer result in erroneous
parsing, which violates data integrity.

Limit boundary size, as allowed by RFC 1521:

    Encapsulation boundaries [...] must be no longer than 70 characters, not
    counting the two leading hyphens.

We correctly parse payloads with boundaries of length up to
FILLUNIT-strlen("\r\n--") bytes, so allow this for BC.
2024-09-23 11:43:26 +01:00
Niels Dossche
72a2cbcc7f Fix bug #73182: PHP SOAPClient does not support stream context HTTP headers in array form
This code is modelled after how `http_fopen_wrapper.c` does things,
which apparently is just looping over the array and handling each string
the same way as if we passed a header string directly.

Also fixes a potential crash in `php_sdl.c` but without adding support
for header arrays there (yet) because the code is untested.

Closes GH-15817.
2024-09-10 20:24:14 +02:00
Dmitry Stogov
5cf045d357 Fix GH-15820: Core dumped with jit.opcache=1245 2024-09-10 15:42:23 +03:00
Niels Dossche
bcd1f23b30 Fix buffer size configuration for AArch64 2024-09-09 22:02:39 +02:00
Niels Dossche
c1ffd4b484 Fix GH-15658: Segmentation fault in Zend/zend_vm_execute.h
Implement a minimal ZEND_MATCH handler using a tail call.

Closes GH-15782.
2024-09-09 20:26:16 +02:00
Niels Dossche
86ef8d5466 Fix GH-15661: Access null pointer in Zend/Optimizer/zend_inference.c
Closes GH-15666.
2024-09-09 20:10:16 +02:00
Niels Dossche
979e68a2ec Fix SOAP test failure on libxml2 2.13
libxml2 2.13 has different formatting behaviour: it outputs `<faultcode/>`
instead of `<faultcode></faultcode>`, and similarly for `env:Value`.
Normalize the output.

Closes GH-15801.
2024-09-09 20:04:15 +02:00
Ilija Tovilo
0faa1d2017 Fix MSAN getservbyport() false positive
Closes GH-15814
2024-09-09 19:34:43 +02:00
Ilija Tovilo
1f35e2a999 Fix uninitialized CG(zend_lineno)
Closes GH-15813
2024-09-09 19:34:05 +02:00
Ilija Tovilo
b9fdc0bdcd Fix uninitialized EG(user_error_handler_error_reporting)
Closes GH-15812
2024-09-09 19:33:32 +02:00
Ilija Tovilo
24a294922b Fix uouv in array_column
column_long and index_long might not be set, but are still used as arguments.
They are not actually used if column_str is set, but it's better to initialize
them anyway, if only to make MemorySanitizer happy.
2024-09-09 16:55:02 +02:00
Ilija Tovilo
99504aa148 Intercept strlcpy and strlcat for msan on Clang 17 (#12674) 2024-09-09 16:45:46 +02:00
Go Kudo
d966c296d0 Fix OPcache tests under specific conditions 2024-09-09 10:00:25 +03:00
Go Kudo
bca5f6e74f Fix OPcache tests under specific conditions 2024-09-09 09:55:52 +03:00
Ilija Tovilo
08e0729c57 Fix uninitialized lineno in constant AST of internal enums
Closes GH-15806
2024-09-08 23:44:11 +02:00
Derick Rethans
5fc37b1ec6 Updated to version 2024.2 (2024b) 2024-09-06 12:33:36 +01:00
Daniel Scherzer
c5e0a6aaab Fix GH-15752: finfo_file() - parameter validation error messages
Show the correct parameter names and numbers - the errors are caused by the
second parameter being empty or having null bytes, not the first.

close GH-15755
2024-09-05 01:41:15 +01:00
Máté Kocsis
6cab76986d Add missing return for DatePeriod::__unserialize
Additionally, add other RETURN_THROWS() defensively.
2024-09-03 21:27:50 +02:00
Dmitry Stogov
1e78cf941c Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717) 2024-09-02 21:55:19 +03:00
Ilija Tovilo
57f9041165 [skip ci] Backport libmysql build fix (d9a9696) 2024-09-02 12:08:55 +02:00
Christoph M. Becker
08841bf79c Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
We ensure that the argnum `value` is in the allowed range, *before*
mapping it to the `objIndex`, not *afterwards*.

Closes GH-15581.
2024-09-01 17:24:17 +02:00
Christoph M. Becker
93021c635d Fix GH-15628: php_stream_memory_get_buffer() not zero-terminated
We're reasonably sure that appending the NUL is not an OOB write, since
the memory stream implementation uses `zend_string` APIs instead of
fiddling with the buffer.

We don't add a regression test because that would require to set up
something in the zend_test extension, and regressions are supposed
to be caught by external consumers of this API, such as mailparse.

Closes GH-15648.
2024-09-01 14:55:40 +02:00
Go Kudo
bf9929a26c standard: supress msan (#15665) 2024-08-31 15:56:11 +09:00
David Carlier
7db1a5843f Fix GH-15653: fgetcsv overflow on length parameter.
close GH-15655
2024-08-30 17:16:57 +01:00
Dmitry Stogov
afba2010c0 Don't set IS_STR_PERMANENT flag for strings stored in the file cache (#15643) 2024-08-30 00:59:06 +03:00
Dmitry Stogov
fd42cdbd0a Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635) 2024-08-29 16:46:49 +03:00
Arnaud Le Blanc
4db78140a0 [ci skip] NEWS for GH-15330 2024-08-28 17:44:20 +02:00
Arnaud Le Blanc
cd25500766 Do not scan generator frames more than once (#15330) 2024-08-28 17:43:17 +02:00
Peter Kokot
7878a2c322 Fix iconv_open basic test (#15611)
Transliteration works differently across the iconv implementations and
the system. When using GNU libiconv the output in this test is:
string(16) "Zlutouck'y kun\n"
(like on Windows). On glibc's built-in iconv output is:
string(15) "Zlutoucky kun\n"
2024-08-28 14:29:49 +02:00
Dmitry Stogov
eb87de1c87 Fix GH-15502: Crash with JIT and Excimer (#15601) 2024-08-27 21:12:29 +03:00
David Carlier
cc67220ea3 Fixed GH-15547: curl_multi_wait expects a signed int for timeout.
confusion might come from the previous argument type.
PHP expects ms so we check it fits integer boundaries before the cast.
raising a warning at least for stable branches.

close GH-15548
2024-08-27 04:56:32 +01:00
Bernd Kuhls
5947db6bb8 Fix GH-15587: Autotools: fix configure check for aarch64 CRC32 API
On arm32 bit the check succeeds leading to a build error later on:

/home/autobuild/autobuild/instance-3/output-1/build/php-8.3.10/ext/standard/crc32.c:70:12:
 error: 'armv8-a' does not support feature 'nothing'
   70 | #   pragma GCC target ("+nothing+crc")

Co-authored-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[http://lists.busybox.net/pipermail/buildroot/2024-August/761151.html]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
2024-08-25 18:00:29 +02:00
Niels Dossche
4b6575a1f9 Fix GH-15565: --disable-ipv6 during compilation produces error EAI_SYSTEM not found
Closes GH-15567.
2024-08-24 14:14:20 +02:00
Niels Dossche
9af574c26e Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
Closes GH-15556.
2024-08-23 19:40:42 +02:00
Peter Kokot
48a18e5be7 Fix bug GH-15514 (Configure error: genif.sh: syntax error)
Autoconf assigns the current suitable shell to SHELL variable. This
notably fixes cases on Solaris 10 when using C shell or KornShell where
genif.sh: syntax error at line 35 occurs due to using the `sh` command.
2024-08-21 18:16:07 +02:00
Peter Kokot
63841ba7cf Fix GH-15515: Configure error grep illegal option q (#15516)
On Solaris default grep doesn't support the -q option. In such cases
the grep output can be redirected to /dev/null and the exit status is
checked.
2024-08-21 15:51:27 +02:00
Christoph M. Becker
6652a34006 [skip ci] Fix NEWS 2024-08-20 16:17:19 +02:00
Christoph M. Becker
b1211c1e4a Fix GH-15432: Heap corruption when querying a vector
Since the mysqlnd result set is arena allocated, we must not simply
free it, but rather call the appropriate `free_result` method.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2024-08-20 15:43:21 +02:00
Go Kudo
836e6fa900 zend_max_execution_timer: fix gcc compatibility (#15447) 2024-08-17 05:20:04 +09:00
Go Kudo
bd843d760f [ci skip] fix NEWS 2024-08-17 03:12:38 +09:00
Go Kudo
ad998356dd [ci skip] Update NEWS 2024-08-17 02:57:42 +09:00
Go Kudo
ec9cdcd2bc Fix MSan false-positive in zend_max_execution_timer (#15408)
Explicitly mark memory regions as unpoisoned for zend_max_execution_timer on ZTS, as MemorySanitizer in clang >= 18 causes false positives.
2024-08-17 02:54:03 +09:00
David Carlier
8c3f5f99f3 [ci skip] update NEWS 2024-08-13 21:01:20 +01:00