Skip to content

Commit 2ef7525

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Skip bz2 GH-20807 test when less than 13 GiB of memory is available ext/soap: make GHSA-cj93-vc83-wgqv test lean and reliable Add NEWS entries ext/standard: Fix 1-char relative Location redirects after GH-23467 [http] Fix out-of-bounds read on empty Location header Fix GHSA-ch8v-r6jh-4vvr: encode 0xFF in FILTER_SANITIZE_ENCODED Fix GHSA-9f67-6fw4-hpfp Fix GHSA-j3wh-g957-2m85: phar tar entry injection Fix GHSA-cj93-vc83-wgqv Fix GHSA-rgrp-mwpx-f6rm: unbounded recursion in ext/soap XML parsing and decoding Fix GHSA-fpwc-w8rq-cr92: strip credentials from user headers on cross-origin redirects Fix GHSA-r6x9-5r99-36j7: Various packet overreads in mysqlnd wireprotocol Fix GHSA-xr7j-rvgx-xq5p: OOB read in php_openssl_matches_wildcard_name() Fix GHSA-vvx9-73fr-5jjx: do not fall back to CN if the cert has a service ID Fix GHSA-62xp-839h-2637: FastCGI allowed_clients compared only 96 bits of IPv6 addresses Fix heap-buffer-overflow in convert stream filters with NUL in line-break-chars # Conflicts: # NEWS # ext/phar/tar.c # ext/soap/php_http.c # ext/soap/php_xml.c # ext/standard/http_fopen_wrapper.c # win32/ioutil.c
2 parents 247ae24 + 7d4f779 commit 2ef7525

77 files changed

Lines changed: 4141 additions & 227 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎NEWS‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ PHP NEWS
119119

120120
- FPM:
121121
. Fixed bug GH-19320 (FPM UID and GID overflow). (Pratik Bhujel)
122+
. Fixed GHSA-62xp-839h-2637 (IPv6 ACL bypass in FastCGI listen.allowed_clients
123+
due to partial address comparison). (CVE-2026-91768) (Alexandre Daubois)
122124

123125
- Intl:
124126
. Fixed grapheme_strpos() and grapheme_strrpos() with an empty needle
@@ -143,6 +145,10 @@ PHP NEWS
143145
replacement when a \k<name> backref has no closing delimiter.
144146
(Ilia Alshanetsky)
145147

148+
- MySQLnd:
149+
. Fixed GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd wire
150+
protocol). (CVE-2025-1218) (Jakub Zelenka, Nora Dossche)
151+
146152
- ODBC:
147153
. Fixed odbc_field_len(), odbc_field_scale() and odbc_field_type()
148154
returning uninitialized memory when SQLColAttribute fails.
@@ -156,6 +162,13 @@ PHP NEWS
156162
. Fixed a crash when the huge page SHM remap discarded mappings outside the
157163
reserved address range. (Piotr Hałas)
158164

165+
- OpenSSL:
166+
. Fixed GHSA-vvx9-73fr-5jjx (TLS hostname verification falls back to CN after
167+
SAN mismatch). (CVE-2026-91769) (Jakub Zelenka)
168+
. Fixed GHSA-xr7j-rvgx-xq5p (Heap buffer overflow in
169+
php_openssl_matches_wildcard_name() on crafted server certificate wildcard
170+
CN). (CVE-2026-91767) (Jakub Zelenka)
171+
159172
- PDO:
160173
. Fixed a leak when a persistent connection failed a liveness check
161174
with no other live PDO handle. (iliaal)
@@ -173,6 +186,8 @@ PHP NEWS
173186
(Weilin Du)
174187
. Fixed bug GH-23477 (Memory leak on duplicate native Phar manifest entries).
175188
(Weilin Du)
189+
. Fixed GHSA-j3wh-g957-2m85 (Integer overflow in phar_tar_number() allowing
190+
TAR archive entry injection). (CVE-2026-6103) (Jakub Zelenka)
176191

177192
- Readline:
178193
. Fixed the interactive shell not waiting for the pager process to exit.
@@ -183,19 +198,28 @@ PHP NEWS
183198
(Ilia Alshanetsky)
184199
. Fixed stack overflow when parsing a WSDL with self-referential schema
185200
groups or attributeGroups. (Ilia Alshanetsky)
201+
. Fixed GHSA-rgrp-mwpx-f6rm (Unbounded recursion in server-side
202+
cleanup_xml_node()). (CVE-2026-91765) (Alexandre Daubois)
203+
. Fixed GHSA-cj93-vc83-wgqv (Integer overflow to buffer overflow in SOAP HTTP
204+
parsing). (CVE-2025-14181) (Nora Dossche, Jakub Zelenka)
186205

187206
- Standard:
188207
. Fixed a segfault when a stream filter callback unsets StreamBucket::$data
189208
before re-attaching the bucket. (iliaal)
190-
. Fixed an out-of-bounds read when following a redirect response with an
191-
empty Location header. (iliaal)
209+
. Fixed GHSA-7875-c8px-7q5f (Out-of-bounds read in the HTTP stream wrapper
210+
when following a redirect with an empty Location header). (CVE-2026-93682)
211+
(Ilia Alshanetsky, Jordi Kroon)
192212
. Fixed read buffer compaction in php_stream_filter_flush(). (crystarm)
193213
. Fixed bug GH-22410 (Incorrect float behavior with large numbers).
194214
(arshidkv12)
195215
. Fixed GH-23338 (fsockopen()/pfsockopen() ValueError reported wrong
196216
argument number for $timeout). (lacatoire)
197217
. Fixed bug GH-23576 (Next index for array returned from array_keys() is
198218
wrong). (Lazizbek Ergashev)
219+
. Fixed GHSA-88hq-2827-7pg6 (Out-of-bounds read in convert.* stream filters
220+
when line-break-chars contains NUL). (CVE-2026-92842) (geeknik)
221+
. Fixed GHSA-fpwc-w8rq-cr92 (Cross-origin credential leak in HTTP stream
222+
wrapper redirects). (CVE-2026-91766) (Alexandre Daubois)
199223

200224
- SimpleXML:
201225
. Fixed writing to a dimension of the object returned by attributes() not
@@ -204,6 +228,10 @@ PHP NEWS
204228
SimpleXMLElement::addChild() not being accessible by property name when
205229
namespaces are involved. (Ilia Alshanetsky)
206230

231+
- Windows:
232+
. Fixed GHSA-9f67-6fw4-hpfp (Reserved device names are not rejected before
233+
file and stream I/O). (CVE-2026-17545) (Shivam Mathur, Jakub Zelenka)
234+
207235
- Zip:
208236
. Fixed bug GH-17787 (ZipArchive stream stops reading early when the archive
209237
is freed while the stream is still open). (Eyüp Can Akman)

‎Zend/zend_virtual_cwd.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,19 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
10281028
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
10291029
#endif
10301030

1031+
#ifdef ZEND_WIN32
1032+
switch (php_win32_ioutil_path_kind_a(path, path_length)) {
1033+
case PHP_WIN32_IOUTIL_PATH_RESERVED:
1034+
SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_NAME);
1035+
return 1;
1036+
case PHP_WIN32_IOUTIL_PATH_DEVICE:
1037+
memcpy(resolved_path, path, path_length + 1);
1038+
goto verify;
1039+
default:
1040+
break;
1041+
}
1042+
#endif
1043+
10311044
/* cwd_length can be 0 when getcwd() fails.
10321045
* This can happen under solaris when a dir does not have read permissions
10331046
* but *does* have execute permissions */

‎ext/bz2/tests/gh20807.phpt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ if (PHP_OS === 'FreeBSD') die('skip Worker does not handle OOM gracefully');
1212
if (PHP_OS_FAMILY === 'Darwin') die('skip Too slow');
1313
if (PHP_INT_SIZE !== 8) die('skip Only for 64-bit systems');
1414
if (getenv('SKIP_ASAN')) die('skip ASAN makes this test too slow');
15+
// The decompressed output needs more than 12 GiB of memory at its peak, which
16+
// takes down smaller machines (e.g. 7 GB CI runners) with the OOM killer.
17+
$memInfo = @file_get_contents('/proc/meminfo');
18+
if ($memInfo && preg_match('/MemAvailable:\s+(\d+) kB/', $memInfo, $m) && $m[1] < 13 * 1024 * 1024) {
19+
die('skip Insufficient available memory (less than 13 GiB)');
20+
}
1521
?>
1622
--FILE--
1723
<?php

0 commit comments

Comments
 (0)