Commit Graph

133670 Commits

Author SHA1 Message Date
Niels Dossche
3269aa95cb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12791: Possible dereference of NULL in MySQLnd debug code
2023-11-27 14:02:19 +01:00
Niels Dossche
6a914cb7a5 Fix GH-12791: Possible dereference of NULL in MySQLnd debug code
Closes GH-12794.
2023-11-27 14:01:46 +01:00
Remi Collet
6eecb3e7f5
zip: use index to avoid search by name 2023-11-27 08:33:57 +01:00
Niels Dossche
f8bfc0e373 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Avoid using uninitialised struct
2023-11-25 20:08:26 +01:00
Niels Dossche
ebb4488def Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Avoid using uninitialised struct
2023-11-25 20:08:01 +01:00
Mikhail Galanin
7e7817bc2f Avoid using uninitialised struct
Closes GH-12046.
2023-11-25 20:07:14 +01:00
Bob Weinand
4774dc167e Merge branch 'PHP-8.2' into PHP-8.3 2023-11-25 18:49:22 +01:00
Bob Weinand
c572613596 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-25 18:48:57 +01:00
Bob Weinand
d404e1d1ee USE_ZEND_ALLOC=1 in tests with zend_test.observe_opline_in_zendmm=1 2023-11-25 18:44:45 +01:00
Bob Weinand
88537c55b5 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-25 01:01:56 +01:00
Bob Weinand
50ccea31f2 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-25 00:59:26 +01:00
Bob Weinand
1305ea23ce Add NEWS entry for GH-12768 2023-11-25 00:57:22 +01:00
Florian Engelhardt
8d2df86b06
Fix invalid opline in OOM handlers within ZEND_FUNC_GET_ARGS and ZEND_BIND_STATIC (#12768)
* fix segfault in `ZEND_BIND_STATIC`

In case a `ZEND_BIND_STATIC` is being executed, while the current chunk is full,
the `zend_array_dup()` call will trigger a OOM in ZendMM which will crash, as
the opline might be a dangling pointer.

* add missing test

* `assert()`ing seems easier than trying to make the compiler to not optimize

* moved from function call to INI setting, so we can use this in other places as well

* make `assert()` work no NDEBUG builds

* document magic number

* fix segfault in `ZEND_FUNC_GET_ARGS`

In case a `ZEND_FUNC_GET_ARGS` is being executed, while the current chunk is
full, the `zend_new_array()` call will trigger a OOM in ZendMM which will crash,
as the opline might be a dangling pointer.

---------

Co-authored-by: Florian Engelhardt <florian@engelhardt.tc>
2023-11-25 00:54:02 +01:00
Derick Rethans
2e4b660b27 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-23 16:18:43 +00:00
Derick Rethans
73246bac00 Update NEWS 2023-11-23 16:18:34 +00:00
Derick Rethans
7f96f4b3a3 Merge branch 'import-timelib-2022-10' into PHP-8.2 2023-11-23 16:17:26 +00:00
Derick Rethans
28dabaab2f Import timelib 2022.10 2023-11-23 16:06:00 +00:00
Ben Ramsey
c11d293c94
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-22 21:36:05 -06:00
Ben Ramsey
20eff14c5c
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-22 21:35:39 -06:00
Dmitry Stogov
87107f8688
Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error 2023-11-22 21:11:49 -06:00
Muhammad Moinur Rahman
fafa34d9cd
Add host_cpu type for FreeBSD
In FreeBSD world x86_64 host type is identified as amd64 so add proper
checks for FreeBSD amd64 hosts.

Close GH-12736
2023-11-22 21:10:52 -06:00
Ilija Tovilo
daa38dd63e
Fix in-place modification of filename in php_message_handler_for_zend
php_strip_url_passwd modifies url in-place. We cannot assume from
php_message_handler_for_zend that data is a temporary, modifiable string.

Fixes oss-fuzz #64209
Closes GH-12733
2023-11-22 21:09:42 -06:00
Ilija Tovilo
1fdcfa4ebe
Fix use-after-free of name in var-var with malicious error handler
Fixes oss-fuzz #54325
Closes GH-12732
2023-11-22 21:08:55 -06:00
Jakub Zelenka
55e0748487
Fix #50713: openssl_pkcs7_verify() may ignore untrusted CAs
Closes GH-12499
2023-11-22 21:03:55 -06:00
Ben Ramsey
2b4a47ccec
Merge changes to CertificateGenerator.inc from PHP-8.2
This pulls only the changes made to CertificateGenerator.inc in the PHP-8.2
branch from commit 505e8d2a04.

Co-authored-by: Jakub Zelenka <bukka@php.net>
2023-11-22 20:39:30 -06:00
Niels Dossche
243fa9c143
Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix
The namespace data is freed and set to NULL, but there remain references
to the namespace declaration nodes. This (rightfully) confuses libxml2
because its invariants are broken. We also have to remove all remaining
references from the subtree. This fixes the data corruption bug.

Closes GH-12681.
2023-11-22 20:39:30 -06:00
Niels Dossche
6a76e5d0a2
Fix GH-12702: libxml2 2.12.0 issue building from src
Fixes GH-12702.

Co-authored-by: nono303 <github@nono303.net>
2023-11-22 20:39:30 -06:00
Jakub Zelenka
e43ffb5023
Fix stream fclose_stdiocast_flush_in_progress type 2023-11-22 20:39:30 -06:00
Jakub Zelenka
a7a6151c4f
Fix bug #79945: Stream wrappers in imagecreatefrompng causes segfault
Closes GH-12696
2023-11-22 20:39:30 -06:00
Ilija Tovilo
0b754fc48c
Temporarily disable failing zlib tests on travis (#10738) 2023-11-22 20:39:30 -06:00
Jakub Zelenka
e41cbd2174
Skip slow tests on Travis
Closes GH-12697
2023-11-22 20:39:30 -06:00
Ilija Tovilo
05ba461524
[skip ci] Fix more test tmp file conflicts 2023-11-22 20:39:29 -06:00
Ilija Tovilo
2312637496
Retry tests on deadlock
Closes GH-12693
2023-11-22 20:39:29 -06:00
Ilija Tovilo
e1e140f2f2
Fix file test race condition
005_variation2.phpt creates files with special names, and
filesize_variation5.phpt checks for filesize of inexistent files with special
names. Create the files in a separate directory to avoid these tests clashing.

Closes GH-12692
2023-11-22 20:39:29 -06:00
Niels Dossche
4f5ba054ba
Use __DIR__-relative path in tests
Otherwise we can't run them from another directory, they'll fail
instead.
2023-11-22 20:39:29 -06:00
Niels Dossche
df2af7ff65
Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-22 20:39:29 -06:00
Ilija Tovilo
9bdd0f0de9
Automatically mark tests as flaky
Marking all of these tests as flaky is annoying, so attempt to recognize them
automatically.

Closes GH-12638
2023-11-22 20:39:29 -06:00
Ilija Tovilo
28c312c994
[skip ci] Further increase allowable atime deviation
MSAN is slow in particular, leading to potentially higher deviations.
2023-11-22 20:39:29 -06:00
Niels Dossche
c376f9943f
Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-22 20:39:28 -06:00
Ilija Tovilo
fe34dd1b49
Fix astat imperciseness excemption in test 2023-11-22 20:39:28 -06:00
Ilija Tovilo
f7f9401cc8
Disable -fsanitize=function on Clang 17
Closes GH-12642
2023-11-22 20:39:28 -06:00
Ilija Tovilo
db8c91ae9f
Fix undeclared variable in stat tests
Closes GH-12645
2023-11-22 20:39:28 -06:00
Niels Dossche
e1c6a7c4de
Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-22 20:39:28 -06:00
Niels Dossche
6641cd159e
Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
ICU 74.1 contains new locale data that breaks the test.
Split the test based on the version number to resolve the issue.

Closes GH-12653.
2023-11-22 20:39:27 -06:00
Dmitry Stogov
adaf726373 Fixed regression introduced by https://github.com/php/php-src/pull/9601 2023-11-22 21:25:15 +03:00
Dmitry Stogov
6f355c6c79 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error
2023-11-22 13:26:07 +03:00
Dmitry Stogov
2d65d714a3 Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error 2023-11-22 13:19:10 +03:00
Dmitry Stogov
f48ab6a66f Fixed GH-12747: Function JIT returns invalid error message for coalesce operator on invalid offset 2023-11-22 13:01:35 +03:00
Gina Peter Banyard
af155cf2dc
Mention correct bug number
I'm tired
2023-11-22 04:14:37 +00:00
Gina Peter Banyard
37f67a9a98
ext/standard: Fix GH-9316
http_build_query() default null argument for  is implicitly coerced to string

Closes GH-9316
2023-11-22 04:09:40 +00:00