Skip to content

Commit 48e53b0

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: 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/openssl/xp_ssl.c # ext/phar/tar.c # ext/soap/php_http.c # ext/standard/http_fopen_wrapper.c
2 parents fdc4aa9 + 2ef7525 commit 48e53b0

76 files changed

Lines changed: 4110 additions & 223 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.

‎Zend/zend_virtual_cwd.c‎

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

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