Release date:
2026-10-09 10:19:32 UTC
Description:
- CVE-2025-1218: out-of-bounds reads in the mysqlnd wire-protocol parser. A
malicious or compromised MySQL server could send a truncated packet and make
the client read past the end of the packet buffer. Re-implementation, against
the PHP 5.3 mysqlnd sources, of upstream 114dbb74368e6a6cd6e48ddb4a76dbe8728b84e2
(GHSA-r6x9-5r99-36j7, php-8.2.34 / php-8.3.34); the upstream diff does not
apply to 5.3 in any form, so every bound was re-derived from 5.3's own
bookkeeping. BAIL_IF_NO_MORE_DATA, which only noticed an over-read after it
had happened, is replaced by BAIL_PREMATURE_END / BAIL_IF_NOT_ENOUGH_DATA_EX,
and php_mysqlnd_net_field_length()/_ll() are given the bytes still left in the
packet so a length encoding can no longer be read out of bounds. Memory-safety
fixes cover the greeting (its server version string ran estrdup() off a
2048-byte stack buffer with no terminator guarantee on this branch - strictly
worse here than on any later branch - plus the 31-byte fixed block and the
split scramble), the OK and result-set header packets, the EOF packet, the
in-row EOF marker, the result-set field metadata lengths (which leaked heap
bytes into user-visible column metadata), the text-protocol row field lengths
and ps_fetch_time/date/datetime. The two new checks in prepare_read are
HARDENING ONLY and provably cannot fire; the mysqlnd_ps.c change is a memory
leak fix on the newly reachable prepare-EOF failure path, not an over-read.
The auth-response, SHA256-public-key and caching-sha2 packet readers, the
change-user auth-switch branch and the pluggable-auth parts of the greeting
do not exist at 5.3, so those parts of the upstream fix have no target here.
The 38 upstream .phpt tests are not carried - the fake_server.inc they drive
needs PHP 8.0 syntax - so the C fix ships without tests
- The same mysqlnd_ps.c hunk also corrects that path's result free from
mnd_efree() to upstream's php-7.0 form, mnd_pefree(stmt->result,
stmt->result->persistent): mysqlnd_result_init() allocates the result with
mnd_pecalloc(..., persistent), so on a persistent connection the Zend
allocator was being handed a malloc()ed block. Before the change a hostile
prepare over p:127.0.0.1 aborts with "zend_mm_heap corrupted" on a build
with the Zend MM heap checks compiled in; after it the same run completes,
and a non-persistent connection is unaffected either way
- Also fixes a pre-existing use-after-free on the row-reader failure path: the
CVE-2024-8929 error loops free every field decoded so far without clearing
the zvals, and the result set frees them again at teardown. All 2 sites now
clear after freeing. Confirmed under AddressSanitizer with the Zend allocator
disabled - heap-use-after-free before, clean after, on the three new
short-length tests and the nine CVE-2024-8929 stmt-row tests. Upstream still
carries the same loops unguarded in php-8.2.34 through php-8.5.11
- mysqlnd: initialise every pre-allocated row field before decoding
(php-5.3.29-mysqlnd-rowp-init-fields.patch). The row readers pre-allocate a
zval per column with MAKE_STD_ZVAL(), which sets no type, and only type it
when the decode loop reaches that column; the CVE-2024-8929 error paths
abandon a row part-way, leaving the rest allocated but never typed, and the
result set still frees the whole row at teardown. Each column is now
ZVAL_NULL()ed at allocation. Verified with valgrind under USE_ZEND_ALLOC=0.
PHP 5 only, and kept separate from the CVE patch because the defect predates
it and is reachable without it
Updated packages:
-
alt-php53-5.3.29-219.el8.x86_64.rpm
sha:4f4e606cecc9cef06c7dba779952064a3f6242ce98bb1146325e9f3340406193
-
alt-php53-bcmath-5.3.29-219.el8.x86_64.rpm
sha:6e85f1a0090848c52f5a4ef9556c1073cdd8e8fb66bd173dcfe1a0bb7ef8d3e4
-
alt-php53-cli-5.3.29-219.el8.x86_64.rpm
sha:36741ac6aedad48ce750f9b7376cd86e6d2c20bf3217cfe518593491af4eef96
-
alt-php53-common-5.3.29-219.el8.x86_64.rpm
sha:9299704009105f21e9205fee48992c3009c93d95f794e6ed0a2ba73db57a1a72
-
alt-php53-dba-5.3.29-219.el8.x86_64.rpm
sha:b72671d8a19dd02faa372cf5da3a284442b7ae8a17ffda2b860e135a703e9de6
-
alt-php53-dbx-5.3.29-219.el8.x86_64.rpm
sha:a921a25e5d86cd718f6760cacd13af3034b038aa4877a2e2a487113f63749f6e
-
alt-php53-devel-5.3.29-219.el8.x86_64.rpm
sha:ee449ff80ebc5e0f6da8179b43512e8a49c39ec2a2898dfee4076a8a336129f7
-
alt-php53-enchant-5.3.29-219.el8.x86_64.rpm
sha:45232de8d0e14ebed2d60334133274d933364cb331bb33289bee5896cee1634c
-
alt-php53-firebird-5.3.29-219.el8.x86_64.rpm
sha:2b8d8ecffb2e5b4bb617ac8ce7a562e5c4938d5284322b9262c045e44582b8dc
-
alt-php53-gd-5.3.29-219.el8.x86_64.rpm
sha:1494c6ebf30f7f3afb2c291532bc7ec024b892602724c7db5993b509e5233217
-
alt-php53-imap-5.3.29-219.el8.x86_64.rpm
sha:4eb227ea103dbd37cad22b1dd531cde5e6e65f3cbf96042963c77735b2e4c14e
-
alt-php53-intl-5.3.29-219.el8.x86_64.rpm
sha:ebac58202b6652640d4b0c928fab16ccc35a8845ffbbcc93b012c02be8d487b2
-
alt-php53-ldap-5.3.29-219.el8.x86_64.rpm
sha:14e36d3df35cf95590338af3a43a6693cffb10116c5603a102eef3b525493696
-
alt-php53-mbstring-5.3.29-219.el8.x86_64.rpm
sha:077391c05b455f980e408dd86a596d4440fec30808de35114270653711f03f10
-
alt-php53-mcrypt-5.3.29-219.el8.x86_64.rpm
sha:1e4c57bb156b247641ac6e0a03dd4821a706dbb59b670b9a0afb2529d286e063
-
alt-php53-mssql-5.3.29-219.el8.x86_64.rpm
sha:fcd48ac922320c4f4de0419f52379b04616a83bcdd376f6311cd86d009a758b8
-
alt-php53-mysqlnd-5.3.29-219.el8.x86_64.rpm
sha:6f5726a1f6e5ffd43f8b8ebcbe02fe7cef0223832d6e85e09c6feb1e437a322a
-
alt-php53-odbc-5.3.29-219.el8.x86_64.rpm
sha:240ce87715249b604be0ddc804b6044780c6a4178410993ec18b882a2438a815
-
alt-php53-pdo-5.3.29-219.el8.x86_64.rpm
sha:660b5bfad015ea6e096374078e3152233217c53087e49ebca5b5e2f4bd5b11eb
-
alt-php53-pgsql-5.3.29-219.el8.x86_64.rpm
sha:36776e1da0c70fbcbd4f1fd4bfd7cf1a8fee58f0ec701aaaa6b340a90b3a3f17
-
alt-php53-php-fpm-5.3.29-219.el8.x86_64.rpm
sha:b413c5112ac87686b46d4bdc12a4b79343c79f0f9e437112f3045ed3583cbf65
-
alt-php53-process-5.3.29-219.el8.x86_64.rpm
sha:2e91e8603708e9f7e0834bdec148c22456907fabfa15a2b5b1d6c55c1c37afbb
-
alt-php53-pspell-5.3.29-219.el8.x86_64.rpm
sha:cc07bc8e3422fccae3cfbfb056aea800a8b1aa4909844156756cda6e9ddafa65
-
alt-php53-recode-5.3.29-219.el8.x86_64.rpm
sha:76e9a76cebe38bd8a600fe66b180f45583842e2549e5cc0b5f4be312cff882cc
-
alt-php53-snmp-5.3.29-219.el8.x86_64.rpm
sha:1d37afd4ca8a9dcc154e6115c37d88c6a40ae55a23c41172d62fc0520535a344
-
alt-php53-soap-5.3.29-219.el8.x86_64.rpm
sha:11803de42c7fa4aa5dbe9bfa8764273da97fe4f59d2ee48278f5f0427d6c2653
-
alt-php53-sqlite-5.3.29-219.el8.x86_64.rpm
sha:52adf6e55c3c5986d1d7f7ed8665d522f5df14acf505d41048eb5132907fe434
-
alt-php53-sybase-5.3.29-219.el8.x86_64.rpm
sha:a5151ec9f2652a91abe1cb7313c8935db9774b1f1a08de920fe2c1046b879c8e
-
alt-php53-tidy-5.3.29-219.el8.x86_64.rpm
sha:44bb376845026940a6cd0781e34544c027374effc66f1ec041b3f9ce6294979f
-
alt-php53-xml-5.3.29-219.el8.x86_64.rpm
sha:ec40a1331b7898a92a2a71ee1e00f562ce5361602c52f9b52c5538e11ea019ad
-
alt-php53-xmlrpc-5.3.29-219.el8.x86_64.rpm
sha:42c03c307aee224ba7552cd4d8150a91d95b7e9acd066d2d686ab763d22a1be1
Notes:
This page is generated automatically and has not been checked for errors. For clarification or
corrections please contact the
CloudLinux Packaging Team.