Commit Graph
132671 Commits
Author SHA1 Message Date
Sergey Panteleev 09a9f29a04 Update versions for PHP 8.2.35 php-8.2.35 2026-10-19 10:29:52 +03:00
Ilija Tovilo afd617c801 Add NEWS entry 2026-10-18 19:22:38 +02:00
01a40e89fb 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-18 19:22:38 +02:00
Shivam MathurandMáté Kocsis 512c04e39f Fix macOS CI (#24409)
* Run brew update in macOS CI

* Drop intel macOS from CI

* Fix build on Apple Clang 17+ (#18629)

Fixing "invalid cpu feature string for builtin" errors that started to appear on Apple Clang 17.0.0

(cherry picked from commit 772479ea2f)

* Cleanup macOS job in test-suite.yml

---------

Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
2026-10-18 20:45:03 +05:30
Sjoerd Langkemper 810f0c6a81 Use FreeBSD 14.4 in GitHub actions
FreeBSD 13 is no longer supported.

Closes GH-24374
2026-10-18 02:56:20 +02:00
Shivam Mathur 03e959375b Fix v142 ARM64 hash and floating point results (#24317) 2026-10-14 18:07:59 +05:30
Shivam Mathur e2da6b4bf9 Use the default archive names for Windows ARM64 builds (#24313) 2026-10-14 17:23:24 +05:30
Shivam MathurandDemon 703ca47f12 ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab) (#24316)
(cherry picked from commit 974526b244)

Co-authored-by: Demon <hyh19962008@gmail.com>
2026-10-14 17:20:36 +05:30
Alexandre Daubois 1e8a51d545 Backport PCRE2 security fixes to bundled 10.40
Apply the upstream backports listed for PCRE2 10.40 in SUPPORT-LIFECYCLE.md through 10.49 (GHSA-2p8c-ff85-vh9x, GHSA-q8g2-wprr-34m9, GHSA-9qww-pwc4-77qq, GHSA-fmgr-6ggq-9859, GHSA-3r4p-g7gg-ppmf, GHSA-r9hj-j2rw-4q3m), adapted to 10.40 where the patched code differs. Disable the legacy ARM64 NEON SIMD scanning for GHSA-43gg-c3xx-7w7g, as the upstream fix is a rewrite with no small backport.

Closes GH-24011.
2026-10-12 09:37:31 +02:00
Shivam Mathur 1b47a92963 Preserve bare NUL access with open_basedir on Windows (#24158) 2026-10-06 18:23:41 +05:30
Shivam Mathur 8155a01189 Upgrade macos in CI. (#24032)
macOS 15 for PHP 8.2 and PHP 8.3
macOS 26 for PHP 8.4 and above.
2026-10-02 14:16:05 +05:30
Ilija Tovilo 1b8d390d73 [skip ci] Skip recursion tests on ASAN
ASAN stack usage is unreliable so we might overflow before the limit is reached.
2026-09-25 15:00:52 +02:00
Ilija Tovilo 436cccbd98 [skip ci] Sync .github files
These files should be congruent across branches.
2026-09-25 14:50:40 +02:00
Shivam Mathur b10a60b908 Update PHP SDK to 2.8.4 (#23858) 2026-09-23 13:39:56 +05:30
Marc ce6c0404c8 fix windows ci: w11 no longer treats names like NUL.txt as reserved (#23844) 2026-09-22 16:29:41 +02:00
Jakub Zelenka 3aedde06bc ext/soap: make GHSA-cj93-vc83-wgqv test lean and reliable
The regression test for GHSA-cj93-vc83-wgqv sends a 2 GiB chunked body so
that the client-side 32-bit length arithmetic overflows. Building that
body as a PHP string and wrapping it in a data:// stream materialised the
payload several times (str_repeat, concatenation, and the data:// copy),
and those buffers lingered in the client process after the fork. Total
footprint reached ~8 GiB and the run took ~16s locally, far more under
slower/opcache CI jobs where it swapped and hit the run-tests timeout.

Replace the generic http_server() helper with a minimal server that
streams the 2 GiB filler in 8 MiB blocks. The bytes the client sees are
identical, so the code path under test is unchanged, but the sender's
memory stays small: only the client holds the large buffers (~4 GiB).
Run time drops to ~4s and peak memory roughly halves.

Also raise the free-RAM skip threshold from 4G to 6G to match the ~4 GiB
the client actually allocates, so the test skips rather than swaps on
memory-constrained machines.
2026-09-18 23:17:15 +02:00
Jakub Zelenka a14181c944 Add NEWS entries 2026-09-18 22:26:48 +02:00
Jordi Kroon 64664758cd ext/standard: Fix 1-char relative Location redirects after GH-23467
8196275133 changed the relative-Location check from location_len > 1 to
> 0, so a single-character Location began resolving against the request
path instead of the host root as before.

Closes GH-23521
2026-09-18 22:26:48 +02:00
Ilia Alshanetsky 547566f17a [http] Fix out-of-bounds read on empty Location header
An empty Location header allocates a single byte for the NUL
terminator, so reading location[1] in the relative-redirect branch
over-reads heap memory and could append a garbage-derived path to the
redirect target instead of the correct host root. Use location_len
instead of strlen, and skip the relative join when location_len is 0,
so the second byte is never read.

Closes GH-23467
2026-09-18 22:26:48 +02:00
Ilia Alshanetsky 7ac9700d0d Fix GHSA-ch8v-r6jh-4vvr: encode 0xFF in FILTER_SANITIZE_ENCODED
php_filter_encode_url() initialized its 256-byte "must encode" table with
memset(tmp, 1, sizeof(tmp) - 1), leaving tmp[255] uninitialized. Whether
0xFF got percent-encoded then depended on stack garbage; valgrind reports
the read as a conditional jump on an uninitialised value. Initialize the
whole table.

Backport of 56149186d8 from PHP-8.4.
2026-09-18 22:26:48 +02:00
Shivam MathurandJakub Zelenka f785c3f6ce Fix GHSA-9f67-6fw4-hpfp
Reject Windows reserved device names (CON, NUL, COM1, ...) used as a path
component in filesystem operations. Bare device names and DOS device
paths keep working.

Co-authored-by: Jakub Zelenka <bukka@php.net>
2026-09-18 22:26:47 +02:00
Jakub Zelenka 0994e2e887 Fix GHSA-j3wh-g957-2m85: phar tar entry injection
Reject entry sizes that cannot be parsed or represented, and skip the data
blocks of every entry type that carries data. Both left the stream on
attacker controlled data that was then parsed as a tar header.
2026-09-18 22:26:47 +02:00
Nora DosscheandJakub Zelenka b11bd1d939 Fix GHSA-cj93-vc83-wgqv
Co-authored-by: Jakub Zelenka <bukka@php.net>
2026-09-18 22:26:47 +02:00
Alexandre Daubois 3655b79c7b Fix GHSA-rgrp-mwpx-f6rm: unbounded recursion in ext/soap XML parsing and decoding 2026-09-18 17:12:11 +02:00
Alexandre DauboisandJakub Zelenka 5af9465ca8 Fix GHSA-fpwc-w8rq-cr92: strip credentials from user headers on cross-origin redirects
Authorization, Cookie and Proxy-Authorization set through the http context
were forwarded verbatim when follow_location sent the request to another
origin. They are now stripped from the user header bag whenever the
redirect target differs in scheme, host or port, including when the header
name is repeated or the bag uses malformed line endings.

Co-authored-by: Jakub Zelenka <bukka@php.net>
2026-09-18 17:12:11 +02:00
Jakub ZelenkaandNora Dossche 114dbb7436 Fix GHSA-r6x9-5r99-36j7: Various packet overreads in mysqlnd wireprotocol
Co-authored-by: Nora Dossche <7771979+ndossche@users.noreply.github.com>
2026-09-18 17:12:11 +02:00
Jakub Zelenka 78cc82b37a Fix GHSA-xr7j-rvgx-xq5p: OOB read in php_openssl_matches_wildcard_name()
The memchr() length underflowed when the wildcard prefix and suffix
overlapped in the subject name (e.g. CN "a*aaaa" against peer name "aaaa").
2026-09-18 17:12:10 +02:00
Jakub Zelenka 0bb308eb4c Fix GHSA-vvx9-73fr-5jjx: do not fall back to CN if the cert has a service ID
RFC 6125 6.4.4 forbids matching CN-ID if the certificate presents a DNS-ID,
SRV-ID or URI-ID. Falling back allowed a CA that validated only one of those
identities to leave an unvalidated CN to be matched as a host name.

IP-ID is left out as it is out of scope of RFC 6125 and suppressing CN there
would break IP-only SAN certificates.
2026-09-18 17:06:17 +02:00
Alexandre Daubois dcdfcf86fc Fix GHSA-62xp-839h-2637: FastCGI allowed_clients compared only 96 bits of IPv6 addresses 2026-09-18 17:06:17 +02:00
geeknik b4e3397ec8 Fix heap-buffer-overflow in convert stream filters with NUL in line-break-chars
Use pestrndup() instead of pestrdup() when duplicating lbchars in the
base64-encode, quoted-printable-encode, and quoted-printable-decode
filter constructors. pestrdup() is strlen-based and truncates at the
first NUL byte, but lbchars_len preserves the original length, causing
an out-of-bounds read when the filter later copies lbchars_len bytes
from the truncated allocation.

Fixes GHSA-88hq-2827-7pg6.
2026-09-18 17:06:16 +02:00
Ilija Tovilo 4fa25b04e7 Fix enabling of opcache in community job for PHP <8.5
We still need the zend_extension there. This has been broken for a while.

Closes GH-23295
2026-08-15 23:52:32 +02:00
NickSdot 8a90e02f15 perf: speed up benchmark checkout (#23211) 2026-08-11 11:55:30 +02:00
NickSdot 0d26c1ce63 CI: Select Windows test workers automatically (#22946)
Removes the hard-coded -j2 from Windows CI so run-tests.php selects the worker count automatically
2026-08-10 19:05:06 +02:00
Shivam Mathur a62481f507 Upgrade php-sdk to 2.8.2 (#23193) 2026-08-10 14:01:20 +05:30
Shivam Mathur d3af7240d9 Fix hMailServer URL in Windows CI (#23055) 2026-08-05 12:27:48 +05:30
Ilija Tovilo 642f069bd4 [skip ci] Remove CLEAN from GHSA-7qpv-r5mr-78m4.phpt in PHP 8.2
The CLEAN section causes issues in CI on Windows + PHP 8.2 + ext-pgsql. This was
fixed in 94dc6ae871, but landed only in 8.3+.
2026-08-03 13:52:57 +02:00
Sergey Panteleev f6d2a834af PHP-8.2 is now for PHP 8.2.34-dev 2026-07-28 13:26:34 +03:00
Ilija Tovilo f93c48725d Add NEWS entries 2026-07-28 11:34:22 +02:00
Jakub Zelenka 2e0fa0a444 Fix GHSA-vc5h-9ppw-p5f3: phar circular symlink crash
Prevents infinite recursion in phar_get_link_source.
2026-07-28 11:11:57 +02:00
Ilija Tovilo ab048bd83b Fix SQL injection in ext-pgsql via E'...' backslash breakout
php_pgsql_add_quotes() quotes the string with E'...', but PQescapeStringConn()
does not escape \ unless standard_conforming_strings is off.
PQescapeStringConn() is meant to be used with '', so do that instead.

Fixes GHSA-7qpv-r5mr-78m4
2026-07-28 11:11:57 +02:00
Ilija Tovilo fcd691b377 libgd patch for CVE-2026-9672
Patch by Pierre Joye (pierrejoye).
2026-07-28 02:48:11 +02:00
Ilija Tovilo bed2aa9375 [skip ci] Revert "CI: Enable JIT testing on Apple Silicon ZTS 8.6+"
This reverts commit fa47ae16a1.

On macOS in GitHub Actions, pthread_jit_write_protect_supported_np() returns
false. So, there's really no point in running JIT with it in the first place.

We'll still need to tweak some tests when they explicitly enable the JIT.
2026-07-23 21:17:02 +02:00
Ilia Alshanetsky 011ad34868 Regenerate the expired ext/ftp/tests/cert.pem (#22873)
The self-signed certificate the FTP test server presents
(ext/ftp/tests/server.inc) was generated in 2016 with a ten-year
validity and expired on 2026-07-23, so ext/ftp/tests and the ftps://
stream tests (ext/standard/tests/streams/opendir-003 and -004) fail the
TLS handshake with "certificate expired" on every branch. Regenerate it
as a self-signed CN=127.0.0.1 certificate that expires 2099-12-31, so
the suite does not silently break again on a ten-year cadence.
2026-07-23 15:08:36 -03:00
Arnaud Le BlancandFlorian Engelhardt fa47ae16a1 CI: Enable JIT testing on Apple Silicon ZTS 8.6+
Related: GH-22712

Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com>
2026-07-16 12:11:53 +02:00
Ilija Tovilo 2d86f8cf48 Fix leak on double DatePeriod::__construct() call
Closes GH-22643
2026-07-15 20:38:23 +02:00
Ilija Tovilo 6f1beedb44 [skip ci] Fix CXXFLAGS for type verification build
The attempted fix in ba32d70 was incorrect as the flags are later overwritten
with -D_GLIBCXX_ASSERTIONS.

Closes GH-22639
2026-07-08 18:58:28 +02:00
Remi Collet ee0f2b9e51 [ci skip] add CVE ref 2026-07-08 08:57:05 +02:00
Ilija Tovilo ba32d70130 [skip ci] Add -DZEND_VERIFY_TYPE_INFERENCE to CXXFLAGS for variation build
Without this, executor globals vary in size and offsets for C vs. C++, which
leads to issues since GH-22287.
2026-07-07 12:55:06 +02:00
Sergey Panteleev 9aaf634fde PHP-8.2 is now for PHP 8.2.33-dev 2026-07-01 11:11:52 +03:00
David Carlier cbc0489126 ext/openssl: openssl_encrypt() zend mm heap overflow on AES-WRAP-PAD mode.
Fix #22186

close GH-22187
2026-06-30 01:49:11 +02:00