CVE-2026-99534 in Linux
Summary
by MITRE • 11/19/2026
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.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel's ksmbd implementation has addressed a critical security flaw related to how SMB2 WRITE requests handle buffer initialization and validation. This vulnerability stems from an insufficient sanitization of memory buffers used for processing incoming network packets, specifically within the context of compound SMB2 operations. In high-performance server environments like those managed by ksmbd, efficient memory management is paramount, leading developers to optimize allocations by avoiding full zeroing of large request buffers when only specific fields require initialization. However, this optimization introduced a logic error where the compatibility byte in the request buffer was initialized without ensuring that the rest of the allocated memory did not contain residual data from previous operations or unrelated kernel activities. This oversight creates a scenario where stale data present in the unzeroed portions of the allocation can be inadvertently processed and written to storage targets if subsequent validation checks fail to properly bound-check the data range against the actual content length specified in the current compound request.
The technical root cause lies in the interaction between memory allocation strategies and input validation logic within the SMB2 WRITE handler. When a client sends an SMB2 WRITE request, particularly one that is part of a compound transaction or has specific compatibility requirements such as zero-length writes, the kernel must ensure that only the intended data payload is processed. The flaw occurs because the system initializes a single-byte compatibility flag without clearing the surrounding buffer memory. If the validation logic fails to strictly verify that the requested write offset and length do not exceed the actual valid data range provided in the packet header, or if it relies on assumptions about buffer cleanliness, stale bytes from previous allocations can be interpreted as part of the current file write operation. This allows an attacker who controls the SMB client side to influence what is written to files or Inter-Process Communication (IPC) pipes by crafting requests that exploit this uninitialized memory state.
The operational impact of this vulnerability is significant for systems relying on ksmbd for network file sharing, as it can lead to data corruption and unauthorized information disclosure. By writing stale kernel heap data to user-accessible files or IPC endpoints, an attacker could potentially overwrite critical application data with unpredictable content, leading to service instability or crashes. More critically, if the stale data contains sensitive information from other processes that previously used the same memory region, it could result in a local information leak. This effectively bypasses standard isolation boundaries within the kernel heap, allowing low-privilege users or remote attackers to read arbitrary kernel memory contents indirectly through file system operations. Such behavior aligns with CWE-120 Buffer Copy without Checking Size of Input and CWE-787 Out-of-bounds Write, as it involves writing data beyond its intended scope due to improper boundary validation and uninitialized memory usage.
To mitigate this risk, the resolution focuses on tightening the validation logic within the WRITE handlers rather than reverting to inefficient full-buffer zeroing which would degrade performance. The fix ensures that before any data is written to files or IPC pipes, the system strictly validates the data range against the current compound request parameters. This includes verifying that the offset and length fields are consistent with the actual payload size provided in the SMB2 message header. By enforcing strict bounds checking on the valid data range, the kernel prevents access to uninitialized memory regions even if they remain present in the allocation buffer. Additionally, maintaining a specific one-byte compatibility exception for SMB2 messages ensures backward compatibility while closing the security gap. This approach balances performance with security by ensuring that only explicitly defined and validated portions of the request are processed, thereby eliminating the possibility of stale data leakage or corruption.
From an offensive perspective, this vulnerability can be leveraged in attacks categorized under MITRE ATT&CK technique T1074 Data Staged, where attackers stage stolen data for exfiltration by writing it to accessible locations via SMB shares. It also relates to T1562 Impair Defenses, as the corruption of file systems or IPC mechanisms can disrupt security monitoring and logging capabilities. Defense-in-depth strategies should include keeping ksmbd updated with the latest kernel patches that address this specific validation logic error. Furthermore, administrators should monitor for unusual SMB traffic patterns involving large compound requests or zero-length writes to detect potential exploitation attempts in real-time. Ensuring that file system permissions are strictly enforced can also limit the blast radius if an attacker successfully exploits this flaw to write malicious content into sensitive directories.