CVE-2026-99534: ksmbd: prevent stale data from being written by SMB2 WRITE requests
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: prevent stale data from being written by SMB2 WRITE requests
Initialize the compatibility byte in request buffers without zeroing the entire allocation. Keep the one-byte compatibility exception for SMB2 messages so valid zero-length WRITE requests remain compatible, and validate the data range in the WRITE handlers against the current compound request before accessing it.
This prevents stale request-buffer data from being written to files or sent to IPC pipes.
The Linux kernel CVE team has assigned CVE-2026-99534 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit 443d61d1fa9faa60ef925513d83742902390100f and fixed in 6.12.117 with commit 139e8a3d6edd0c5b5dfe4ada2f636146e1209dc3 Issue introduced in 6.4 with commit 443d61d1fa9faa60ef925513d83742902390100f and fixed in 6.18.61 with commit fbe9fcda7ae8835b454c376de1d49232ab6bbcfb Issue introduced in 6.4 with commit 443d61d1fa9faa60ef925513d83742902390100f and fixed in 7.3.2 with commit 97d489f68b85a5b64496e01d4cb3c0e092aa817e Issue introduced in 6.4 with commit 443d61d1fa9faa60ef925513d83742902390100f and fixed in 7.4-rc1 with commit bc0e0f5ac1d7b044d403f859406b4b66d4b1ce9b Issue introduced in 5.15.113 with commit 61e043326e72b5abb02b5bc9132f2620a7faf8c5 Issue introduced in 6.1.30 with commit af7335a4b946f9f6f9d98398cbcea15cd9850409 Issue introduced in 6.3.4 with commit 778aae5a513ea09aa5addfa352bd70a5b71dda85
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99534
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/smb/server/compress.c
fs/smb/server/connection.c
fs/smb/server/smb2pdu.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/139e8a3d6edd0c5b5dfe4ada2f636146e1209dc3 https://git.kernel.org/stable/c/fbe9fcda7ae8835b454c376de1d49232ab6bbcfb https://git.kernel.org/stable/c/97d489f68b85a5b64496e01d4cb3c0e092aa817e https://git.kernel.org/stable/c/bc0e0f5ac1d7b044d403f859406b4b66d4b1ce9b