[CLSA-2026:1791443306] Fix CVE(s): CVE-2025-1218, CVE-2026-91766, CVE-2026-93682
Type:
security
Severity:
Important
Release date:
2026-10-08 07:08:44 UTC
Description:
* SECURITY UPDATE: various out-of-bounds reads in the mysqlnd wire protocol parser - debian/patches/php-5.4-CVE-2025-1218.patch: backport upstream commit 114dbb74368e6a6cd6e48ddb4a76dbe8728b84e2 to ext/mysqlnd. The packet readers decoded fields out of a server response before checking that the packet still held enough 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 overread 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 gain a remaining_size argument and refuse to decode a length whose payload is not present; the auth-plugin-data branches of greet_read, auth_response_read and chg_user_read use memchr() instead of trusting a NUL terminator; and ps_fetch_time/date/datetime stop reading fixed offsets out of a shorter declared length. - Two items in the upstream commit are hardening rather than memory safety and are labelled as such in the patch: the prepare_read() size checks cannot fire behind the existing PREPARE_RESPONSE_SIZE gate, and the mysqlnd_ps.c hunk is a leak fix on the failure path the rest of the change makes reachable, not an overread fix. - Not applicable on this branch, because the code does not exist at 5.4: the MARIADB_RPL_VERSION_HACK guard in greet_read (macro absent), and the cached_sha2_result_read and sha256_pk_request_response_read hunks (both functions absent; this repo carries no caching-sha2 backport). - php-5.4-CVE-2024-8929.patch already supplies the mysqlnd_ps_codec.c helper trio and the text-row packet_end bound this change builds on. Deleting upstream's greet_read NUL-terminator hack would have left 5.4's still-unbounded auth_protocol estrdup() reading off the 2048-byte stack buffer, so the bounded form from upstream d37a20c4a24a70dbbcfd8724cd2ad5f1b005bd2a is carried as part of this patch. - Upstream's 38 regression tests are not carried: they need the PHP 8 fake_server.inc extension from the same commit rewritten for 5.4, and this package's rpm check stage runs harvested .phpt files in a build tree configured without mysqli, where they could only skip or fail. - The same 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), since mysqlnd_result_init() allocates the result with mnd_pecalloc(..., persistent) and a persistent connection therefore gave the Zend allocator 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 - Also fixes a pre-existing use-after-free on the row-reader failure path. The CVE-2024-8929 backport added error loops in the binary- and text-protocol row readers that zval_ptr_dtor() every field decoded so far and return FAIL without clearing the zvals, so the result set frees the same zvals again when it is torn down. The loops were already reachable before this change; the new too-short TIME/DATE/DATETIME check adds a second way in. All 2 sites now clear the zval after freeing it. Confirmed under AddressSanitizer with the Zend allocator disabled: heap-use-after-free in mysqlnd_result_buffered_zval free_result before, clean after, on both 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; php-8.1 is not affected. - CVE-2025-1218 * mysqlnd: initialise every pre-allocated row field before decoding - debian/patches/php-5.4.45-mysqlnd-rowp-init-fields.patch: the binary- and text-protocol 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, so every column past the failure point stays allocated but never typed, and the result set still frees the whole row at teardown - _zval_ptr_dtor() then branches on an uninitialised Z_TYPE. Each column is now ZVAL_NULL()ed at allocation. Confirmed with valgrind under USE_ZEND_ALLOC=0: the CVE-2024-8929 and CVE-2025-1218 stmt-row tests go from 1 uninitialised-value error to 0. PHP 5 only - from PHP 7 the row is a caller-owned array that mysqlnd_store_result() memset()s to zero. Kept separate from the CVE patch because the defect predates it and is reachable without it
Updated packages:
  • alt-php54_5.4.45-203_amd64.deb
    sha:91b229b51117ba4587ebf38dc59b129ed974132e
  • alt-php54-bcmath_5.4.45-203_amd64.deb
    sha:694d89cf1372554ad23210c02f1ba5091560c522
  • alt-php54-cli_5.4.45-203_amd64.deb
    sha:206aec38a148d88891cca24f1aae52b8fe5a2c50
  • alt-php54-common_5.4.45-203_amd64.deb
    sha:0cdeec67f5ce98e5cb32d0b95780ce72314a9823
  • alt-php54-dba_5.4.45-203_amd64.deb
    sha:9593e87eb02b35d02f64d426a9ece341765f51b9
  • alt-php54-dbx_5.4.45-203_amd64.deb
    sha:865f2f0ddfeeaeed7de2753f47a1e0ca24d5d426
  • alt-php54-dev_5.4.45-203_amd64.deb
    sha:8a49516c94abb862f6adb3f70ef1a289da88d009
  • alt-php54-enchant_5.4.45-203_amd64.deb
    sha:1cf49f5c63313d92c9c751115a17b73176799ac5
  • alt-php54-firebird_5.4.45-203_amd64.deb
    sha:5923f99ecc3f52ff07692eb9c1d81ca51d020080
  • alt-php54-gd_5.4.45-203_amd64.deb
    sha:a4ddbb8d7afd81e65752c56aa4fd1c65bc2f6c43
  • alt-php54-imap_5.4.45-203_amd64.deb
    sha:64d8c28efc601c15e8e3aa49390ccaa7989bb68f
  • alt-php54-intl_5.4.45-203_amd64.deb
    sha:347552013800abf8374237d727d92921e1f05e20
  • alt-php54-ldap_5.4.45-203_amd64.deb
    sha:f98c720bfa2eeda98c84942e55ac96f489d7274b
  • alt-php54-mbstring_5.4.45-203_amd64.deb
    sha:11525afea4f2755343451001c5ee3977e02fb1ce
  • alt-php54-mcrypt_5.4.45-203_amd64.deb
    sha:260fb39a54a71b1744f2b16310e0c64dc316ae63
  • alt-php54-mssql_5.4.45-203_amd64.deb
    sha:bdb8a572351a5c99502fd63d241b31773d8f1b0e
  • alt-php54-mysqlnd_5.4.45-203_amd64.deb
    sha:9963e194c08dbd816eb6d1002dda61aa8a951c6c
  • alt-php54-odbc_5.4.45-203_amd64.deb
    sha:108d368b265f64c93927f37dde01e86f987334b2
  • alt-php54-pdo_5.4.45-203_amd64.deb
    sha:3e8254b9d982f01ac9bd80d4d8dcbc7cfe696366
  • alt-php54-pgsql_5.4.45-203_amd64.deb
    sha:53f8908343b8bc464fd1aca6e2b1b9007ef59791
  • alt-php54-php-fpm_5.4.45-203_amd64.deb
    sha:9cb7b0f4f157eb4add65dde949c1f1570e930203
  • alt-php54-process_5.4.45-203_amd64.deb
    sha:d36173182eab7316a754a4d5903bf981a1b7dce2
  • alt-php54-pspell_5.4.45-203_amd64.deb
    sha:a50de7453f54274b495f4b1c4d9e4e83b1418d82
  • alt-php54-recode_5.4.45-203_amd64.deb
    sha:8f49c509f57465da9b42011bc25a975fb3186fcb
  • alt-php54-snmp_5.4.45-203_amd64.deb
    sha:2ad4f252be63e9a2fa5d0385e5e112f647cd1867
  • alt-php54-soap_5.4.45-203_amd64.deb
    sha:3557227cba603d9ed8e4fa0578f9078153d50dd0
  • alt-php54-sybase_5.4.45-203_amd64.deb
    sha:3e148ed59407a91339013f4a958dcd8b7e6557a0
  • alt-php54-tidy_5.4.45-203_amd64.deb
    sha:509ce76d3eca86695b926d949fbfeeef5135ddaf
  • alt-php54-xml_5.4.45-203_amd64.deb
    sha:dcfba7be5636a9e1ee89e893fb3fc079c852ed3f
  • alt-php54-xmlrpc_5.4.45-203_amd64.deb
    sha:d2342f178428e0dea91a10234e6d3845aad32d5c
  • alt-php54_5.4.45-203_arm64.deb
    sha:b6b11ab82a8a63069bd173ffcc31fc6a171447ff
  • alt-php54-bcmath_5.4.45-203_arm64.deb
    sha:5cee93a34e9f87426103fdc6fdf535125234d3ef
  • alt-php54-cli_5.4.45-203_arm64.deb
    sha:28d968aac2531440547019a7b7f03ab3d4600a99
  • alt-php54-common_5.4.45-203_arm64.deb
    sha:396c89809413a2424bba91fdbf1021eaf8680432
  • alt-php54-dba_5.4.45-203_arm64.deb
    sha:2d8d9707b4c8a4eb8ade6f5c78860c5a7e2ac038
  • alt-php54-dbx_5.4.45-203_arm64.deb
    sha:b13eb1b896b97966a29281443a32fe5a51c1f187
  • alt-php54-dev_5.4.45-203_arm64.deb
    sha:84f731db4fec528f6207d35ade30563a7912d90f
  • alt-php54-enchant_5.4.45-203_arm64.deb
    sha:94e8c6788e4373a6208803bd3d8be7d406c4c629
  • alt-php54-firebird_5.4.45-203_arm64.deb
    sha:10ed0171af8981f8001a4b22c07ad559729117aa
  • alt-php54-gd_5.4.45-203_arm64.deb
    sha:24c5b5b9f88829d446fda6016cde11b0208f2850
  • alt-php54-imap_5.4.45-203_arm64.deb
    sha:ea62fb39b663dd35c1a60b67425b209d669accdf
  • alt-php54-intl_5.4.45-203_arm64.deb
    sha:e5c064b96c71307992cb67321650d8189fb45e9e
  • alt-php54-ldap_5.4.45-203_arm64.deb
    sha:1dfd72d63c33d6cc7271eb33e73d9fa192b90918
  • alt-php54-mbstring_5.4.45-203_arm64.deb
    sha:24753898a296d049bcd40d5e2ffaa174da03a28b
  • alt-php54-mcrypt_5.4.45-203_arm64.deb
    sha:85de0a203a456df60de6ba9b5b55fb89136e7cd7
  • alt-php54-mssql_5.4.45-203_arm64.deb
    sha:d6eaf0aa2ed5fe23204ec9eef681d6ad56979611
  • alt-php54-mysqlnd_5.4.45-203_arm64.deb
    sha:a69e0b634ed424ebb2a44164842164735dae6c89
  • alt-php54-odbc_5.4.45-203_arm64.deb
    sha:8ef77b93e37931c24a3ca71b5dd6233235431822
  • alt-php54-pdo_5.4.45-203_arm64.deb
    sha:c970423e9514ca3d07cdf7611271959ac76fb853
  • alt-php54-pgsql_5.4.45-203_arm64.deb
    sha:7d9408859846d23f88dd49c468f87ab785e812ff
  • alt-php54-php-fpm_5.4.45-203_arm64.deb
    sha:36d94d84e10bedd5259f450e0a6b1ecad8255bcf
  • alt-php54-process_5.4.45-203_arm64.deb
    sha:47e0d607651d426447cdec08d96b094fb454e5ce
  • alt-php54-pspell_5.4.45-203_arm64.deb
    sha:d3cd734775cd74d3fdf88ca769c0d949239b73b8
  • alt-php54-recode_5.4.45-203_arm64.deb
    sha:765200af3f2f202a20f4bd6895136c44b577a3bd
  • alt-php54-snmp_5.4.45-203_arm64.deb
    sha:8e7591a29fa81baae719532a6b39cefd78143670
  • alt-php54-soap_5.4.45-203_arm64.deb
    sha:fdf6f68bc22e122d306c9e4a972737109fd929c7
  • alt-php54-sybase_5.4.45-203_arm64.deb
    sha:793f984ec4d505469d4192a7a75bd41b384939f7
  • alt-php54-tidy_5.4.45-203_arm64.deb
    sha:150fce047679ce9e16557d5837ffb2bc94e14adc
  • alt-php54-xml_5.4.45-203_arm64.deb
    sha:3fcca9f984868b6f690de654bc13b999318416be
  • alt-php54-xmlrpc_5.4.45-203_arm64.deb
    sha:9f0b146bfb385ebeaf2b32c771ab212db9de99d3
Notes:
This page is generated automatically and has not been checked for errors. For clarification or corrections please contact the CloudLinux Packaging Team.