php-src/ext
Niels Dossche e643129bbb
Fix GH-16628: FPM logs are getting corrupted with this log statement
zlog_buf_prefix() can return a larger length than what actually was
written due to its use of snprintf(). The code in
zlog_stream_prefix_ex() does not take this into account, other callers
do. What ends up happening then is that stream->length is set to the
length as if snprintf() was able to write all bytes, causing
stream->length to become larger than stream->buf.size, causing a
segfault.

In case the buffer was too small we try with a larger buffer up to a
limit of zlog_limit. This makes sure that the stream length will remain
bounded by the buffer size.

This also adds assertions to make the programmer intent clear and catch
this more easily in debug builds.

Closes GH-16680.
2024-11-02 19:36:20 +01:00
..
bcmath ext/bcmath: Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0) 2024-05-30 15:47:25 +01:00
bz2 Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
calendar Fix GH-16234 jewishtojd overflow on year argument. 2024-10-06 18:07:11 +01:00
com_dotnet Fix out of bound writes to SafeArray data 2024-10-09 21:14:44 +02:00
ctype Merge branch 'PHP-8.1' into PHP-8.2 2023-09-26 21:44:00 +02:00
curl curl: Prevent a CurlMultiHandle from holding onto a CurlHandle if add_handle fails (#16302) 2024-10-09 09:37:13 +02:00
date Fix GH-14732: date_sun_info() fails for non-finite values 2024-11-01 23:46:19 +01:00
dba Fix GH-16390: dba_open() can segfault for "pathless" streams 2024-10-21 00:21:34 +02:00
dl_test Merge branch 'PHP-8.1' into PHP-8.2 2023-11-03 17:17:23 +00:00
dom Fix GH-16595: Another UAF in DOM -> cloneNode 2024-10-28 19:37:08 +01:00
enchant
exif Fix GH-16409: Segfault in exif_thumbnail when not dealing with a real file 2024-10-13 21:12:17 +02:00
ffi Fix GH-16397: Segmentation fault when comparing FFI object (#16401) 2024-10-14 19:23:04 +02:00
fileinfo Fix GH-15752: finfo_file() - parameter validation error messages 2024-09-05 01:41:15 +01:00
filter Fix GH-16523: FILTER_FLAG_HOSTNAME accepts ending hyphen 2024-10-21 21:19:54 +02:00
ftp Fix compilation of ftp without openssl 2023-12-05 11:55:44 +01:00
gd Fix GH-16559: UBSan abort in ext/gd/libgd/gd_interpolation.c:1007 2024-10-23 20:09:12 +02:00
gettext ext/gettext: dcgettext/dcngettext fix for stable branches. 2024-03-05 18:39:14 +00:00
gmp ext/gmp: Fix segfault when null is encountered on an overloaded operator 2024-11-02 17:36:32 +00:00
hash Fix crash when converting array data for array in shm in xxh3 2024-08-05 22:06:11 +02:00
iconv Fix iconv_open basic test (#15611) 2024-08-28 14:29:49 +02:00
imap Merge branch 'PHP-8.1' into PHP-8.2 2023-07-10 13:34:21 +02:00
intl Fix GH-15087 IntlChar::foldCase()'s $option is not optional 2024-07-24 16:45:20 +02:00
json Merge branch 'PHP-8.1' into PHP-8.2 2023-05-13 18:53:35 +01:00
ldap ext/ldap: Fix GH-16136 (Memory leak in php_ldap_do_modify()) 2024-09-30 22:23:01 +01:00
libxml Update error message for libxml 2.13 2024-09-12 23:06:25 +02:00
mbstring Fix GH-16360 mb_substr overflow on start and length arguments. 2024-10-11 08:46:48 +01:00
mysqli Fix GH-15432: Heap corruption when querying a vector 2024-08-20 15:43:21 +02:00
mysqlnd Fix GH-15432: Heap corruption when querying a vector 2024-08-20 15:43:21 +02:00
oci8 Update year to 2024 2024-01-04 19:26:32 +01:00
odbc Fix odbc_data_source_001.phpt 2024-08-06 16:54:19 +02:00
opcache Fix lineno in function redeclaration error 2024-10-22 15:04:20 +02:00
openssl Fix GH-16433: Large values for openssl_csr_sign() $days overflow 2024-10-16 11:08:02 +02:00
pcntl Merge branch 'PHP-8.1' into PHP-8.2 2023-09-22 10:26:01 +02:00
pcre Fix GH-16184: UBSan address overflowed in ext/pcre/php_pcre.c 2024-10-03 21:10:57 +02:00
pdo Fix GH-14712: segfault on invalid object. 2024-06-29 15:51:57 +01:00
pdo_dblib
pdo_firebird Fix bogus fallthrough path in firebird_handle_get_attribute() 2024-07-22 18:33:03 +02:00
pdo_mysql ext/pdo_mysql: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
pdo_oci Unparallelize IO heavy tests 2023-03-27 16:33:36 +02:00
pdo_odbc Fix GH-16450: PDO_ODBC can inject garbage into field values 2024-10-31 16:15:17 +01:00
pdo_pgsql Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
pdo_sqlite Fix GH-14712: segfault on invalid object. 2024-06-29 15:51:57 +01:00
pgsql Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections." 2024-02-27 23:03:28 +00:00
phar [skip ci] Mark another phar test as flaky on macOS 2024-10-18 15:24:15 +02:00
posix [skip ci] Mark some more macOS tests as flaky 2024-10-13 02:06:57 +02:00
pspell
random Checks getrandom availability on solaris. 2024-08-13 20:50:15 +01:00
readline ext/readline: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
reflection Fix GH-16601: Memory leak in Reflection constructors 2024-11-02 19:35:20 +01:00
session Fix GH-16290: session cookie_lifetime ini value overflow. 2024-10-13 14:19:18 +01:00
shmop Fix GH-14537: shmop Windows 11 crashes the process 2024-06-28 20:13:47 +02:00
simplexml Fix GH-15837: Segmentation fault in ext/simplexml/simplexml.c 2024-09-11 20:38:38 +02:00
skeleton
snmp
soap Fix GH-16429: Segmentation fault (access null pointer) in SoapClient 2024-10-14 21:59:51 +02:00
sockets Fix socket_recvfrom overflow on buffer size. 2024-10-12 15:23:03 +01:00
sodium Fix memory leaks in ext/sodium on failure of some functions 2024-05-23 22:40:28 +02:00
spl Fix GH-16604: Memory leaks in SPL constructors 2024-11-01 20:42:28 +01:00
sqlite3 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-10 00:08:09 +01:00
standard Fix exception in assert() callback with bail enabled 2024-10-14 13:59:26 +02:00
sysvmsg
sysvsem
sysvshm Fix GH-16591: Assertion error in shm_put_var 2024-10-26 15:07:22 +02:00
tidy Fix memory leaks in ext/tidy basedir restriction code 2024-07-21 16:28:15 +02:00
tokenizer
xml Fix GH-15868: Assertion failure in xml_parse_into_struct after exception 2024-09-13 19:59:41 +02:00
xmlreader Fix GH-16292: Segmentation fault in ext/xmlreader/php_xmlreader.c:1282 2024-10-08 20:54:07 +02:00
xmlwriter Backport libxml2 2.13.2 fixes (#14816) 2024-07-04 15:29:50 +02:00
xsl Add SKIPIFs for upstream regression in libxslt (#14674) 2024-06-26 19:35:52 +02:00
zend_test Fix GH-16628: FPM logs are getting corrupted with this log statement 2024-11-02 19:36:20 +01:00
zip Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
zlib Fix GH-16326: Memory management is broken for bad dictionaries 2024-10-13 02:28:07 +02:00
ext_skel.php