Release date:
2026-10-08 13:24:34 UTC
Description:
- CVE-2025-1218: various packet over-reads in the mysqlnd wire protocol. The
packet readers decoded fields out of a server response before checking that
the packet still held the bytes for them, so a malicious or compromised MySQL
server could make the client read past the end of the packet buffer with a
truncated packet. BAIL_IF_NO_MORE_DATA, which only noticed an over-read after
it had happened, is replaced by BAIL_IF_NOT_ENOUGH_DATA_EX(n), which checks
before the read; php_mysqlnd_net_field_length() and its _ll variant now take
the number of bytes left and refuse to decode a length whose payload is not
fully present; the auth-plugin-name branches in auth_response_read,
chg_user_read and cached_sha2_result_read use memchr() instead of trusting a
NUL terminator (the latter two read into buffers nothing zero-terminates);
the greeting's server version string is read the same way; and the TIME, DATE
and DATETIME readers stop decoding fixed offsets out of a shorter declared
length (GHSA-r6x9-5r99-36j7, upstream 114dbb7436).
- The mysqlnd_ps.c hunk is a leak fix, not a memory-safety one: it releases the
connection reference and the execute command buffer before
mysqlnd_stmt_prepare_read_eof() memsets the statement, a path that only
becomes reachable now that a short EOF packet is rejected. The prepare_read
and sha256_pk_request_response_read changes are hardening rather than memory
safety - prepare_read's new byte counts provably cannot fire behind the
PREPARE_RESPONSE_SIZE gate in front of them, and the sha256 one is a
strictness change.
- Not applicable on 5.5: MARIADB_RPL_VERSION_HACK does not exist here, and
upstream's two-byte look-ahead in cached_sha2_result_read guards a
packet->result read that this branch's caching_sha2_password backport never
added (the one-byte read it does have is guarded instead). The ps_codec
helper trio and the text-row packet_end guard came in with our CVE-2024-8929
backport, so this patch extends them. As a prerequisite the bounded form of
the greeting's auth plugin name from php-8.1.34 is carried too, without which
dropping the NUL-terminating hack would make that estrdup() an unbounded read
off a 2048 byte stack buffer.
- Upstream's 38 phpt tests are not carried: they need the PHP 8 fake_server.inc,
and the RPM test suite runs in the build-cgi tree, which is built without
mysqli/mysqlnd, so every ext/mysqli test skips there.
- 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.5.38-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-php55-5.5.38-182.el6.x86_64.rpm
sha:7d8f9f4158a0362215718e188f7800bcb8a706ab8ea1ace5803ad814ebbcbe78
-
alt-php55-bcmath-5.5.38-182.el6.x86_64.rpm
sha:66c360d8db4d4804cb3be72d610ba97adb197aa83d2da737e44505dae92f00a7
-
alt-php55-cli-5.5.38-182.el6.x86_64.rpm
sha:ca5b40617b92e6e0f84d2f383076cc90c0ce358f55d81cdcab771393f23e15cd
-
alt-php55-common-5.5.38-182.el6.x86_64.rpm
sha:22d036d21c77d4bda659b645deb0f0ed0037768270aea4c58b878dae7ec3628b
-
alt-php55-dba-5.5.38-182.el6.x86_64.rpm
sha:dbce1a9dcd66b81281afd3131015a36fccbbb369bd029aa9e352bed8d2806f9a
-
alt-php55-dbx-5.5.38-182.el6.x86_64.rpm
sha:44c172d8958754f1a0d18ab844920b5d89b462a08bb46f86bc18434f4a1ca468
-
alt-php55-devel-5.5.38-182.el6.x86_64.rpm
sha:d44bd041373da4df910ebdb3e7097bd26e9281874f6d9c6ac59ec461acb310c3
-
alt-php55-enchant-5.5.38-182.el6.x86_64.rpm
sha:097f0363002a4c4577d8bf9a7a9571e3f8904a6575bbcd76ba4cbdd7f9229200
-
alt-php55-firebird-5.5.38-182.el6.x86_64.rpm
sha:66b95f6b31c3d2977f6d10c191e20779368ef57c90637596038c3223d688a734
-
alt-php55-gd-5.5.38-182.el6.x86_64.rpm
sha:7f1c24c4209d53c6eae1ec91f620ee7f935b3a4056c8992aec0878ce058b20ed
-
alt-php55-imap-5.5.38-182.el6.x86_64.rpm
sha:8a979406f33785e131f3d46ae7e179fb49814f21b04c8f2c57bb41a8d5079f0c
-
alt-php55-intl-5.5.38-182.el6.x86_64.rpm
sha:6b13e7cc51e7e6e445401cbdbcab61800674af4fcd3c35ac4d6d6253179c711b
-
alt-php55-ldap-5.5.38-182.el6.x86_64.rpm
sha:c18aff963639f4b9be707330ff4c3d85bbea194fd235e2da955be4af5a5008fe
-
alt-php55-mbstring-5.5.38-182.el6.x86_64.rpm
sha:23c6d6ce99306c13e7c45c2986032deb23a0b2224401a8c07968859748701313
-
alt-php55-mcrypt-5.5.38-182.el6.x86_64.rpm
sha:c45e188ab92da59f74dc1dfe0364f2cfff7e70b522c1f2089c938881e2702bf1
-
alt-php55-mssql-5.5.38-182.el6.x86_64.rpm
sha:81c3dbc99050dad1aa03a10f2a1b5278542fade890214a5cc5e4fc4df201f288
-
alt-php55-mysqlnd-5.5.38-182.el6.x86_64.rpm
sha:25ca522f0d6535b8b2a08e98dbb565270c54776677687c0a3854a78597e64f6d
-
alt-php55-odbc-5.5.38-182.el6.x86_64.rpm
sha:f2413cd91d631a325abadda6d462f72e11e666e9e39a474fa1fc2f68fe60fb28
-
alt-php55-opcache-5.5.38-182.el6.x86_64.rpm
sha:2843a787b2b12a1697d4be914a1e8bb2f115e61aec8ea96c6c1581903e6220b5
-
alt-php55-pdo-5.5.38-182.el6.x86_64.rpm
sha:3a8fa9bdb6e2db136191e7c08ecda36bf0ccfa87276c65036034e1b2ac102ab2
-
alt-php55-pgsql-5.5.38-182.el6.x86_64.rpm
sha:984dce77b23fc315b074ac9421a43a45e5864658c3bac41559e030ac4c408dbc
-
alt-php55-php-fpm-5.5.38-182.el6.x86_64.rpm
sha:b11b4f82ee16d8ca2cca9a23baaa2ec39c79d713f1f6ef623de3acfa2a9511df
-
alt-php55-process-5.5.38-182.el6.x86_64.rpm
sha:7774fee0aaa109c68af643be8378f5979ec9fa89070bb17224cddfb23b0429fc
-
alt-php55-pspell-5.5.38-182.el6.x86_64.rpm
sha:0bc92cb0be9e8262583063f53f5d54ba49e753bd71515738dd429ffe9e50ed7c
-
alt-php55-recode-5.5.38-182.el6.x86_64.rpm
sha:a61ff9bc1c3c4e688294ef77fd6f9c9ebf494dc765fd656e34021b9743d7d401
-
alt-php55-snmp-5.5.38-182.el6.x86_64.rpm
sha:9d63c3beb7fd3ec1d27e5bdc60f78ef01cb7921fb9b3af84dcc2aedf524a4f15
-
alt-php55-soap-5.5.38-182.el6.x86_64.rpm
sha:bf5c62cd2d0aacfdc71b1f1c946afed6f9b6b19867dacc46a1b664ce6b65f959
-
alt-php55-sybase-5.5.38-182.el6.x86_64.rpm
sha:8bd1fbf5f0e5dbfbae4a7c327c27a9fe6716be20e404dc7af7ef77417cdc02d2
-
alt-php55-tidy-5.5.38-182.el6.x86_64.rpm
sha:656ca1ac781829f2016f1c39378c82532b2d448218c280713b8e4f027d7ec8e6
-
alt-php55-xml-5.5.38-182.el6.x86_64.rpm
sha:ba03e19d8c8f981bf0781a844b2347e636bac24caf1b3659e54dd1c6b7a74466
-
alt-php55-xmlrpc-5.5.38-182.el6.x86_64.rpm
sha:40febb16c61f3ed1c84ee0850b911244c6b450be96b3c821a1795c8afe2afe53
Notes:
This page is generated automatically and has not been checked for errors. For clarification or
corrections please contact the
CloudLinux Packaging Team.