CVE-2026-99382 in Linuxinfo

Summary

by MITRE • 11/19/2026

In the Linux kernel, the following vulnerability has been resolved:

smb: client: reject FIND data areas that run past the received response

CIFSFindFirst() and CIFSFindNext() take the directory entries of a TRANS2_FIND_FIRST2 or TRANS2_FIND_NEXT2 response from DataOffset for DataCount bytes. validate_t2() bounds DataOffset at 1024 and ParameterCount + DataCount by the byte count, and nothing compares DataOffset + DataCount with the number of bytes SendReceive() copied into the buffer.

smb_init() places the request and the response in the same cifs_request allocation and cifs_buf_get() clears only the start of it, so a short response whose data area extends past its end has srch_entries_start point at bytes of the request that was just sent, or at whatever the allocation held before, and those bytes are parsed as directory entries. cifs_readdir() and find_cifs_entry() walk the entries with nxt_dir_entry(), which checks every entry but the first of a response against the end of the SMB; cifs_query_path_info() and cifs_backup_query_path_info() read the first entry with no check at all. Those reads stay inside the allocation, but what they return is not part of the response. The last entry, which LastNameOffset locates relative to the data area, is bounded against the received response by an earlier patch of this series, as is every entry that cifs_fill_dirent() parses; the walk itself and the two query functions are not.

SMB1 is not negotiated by default; reaching this code requires an explicit vers=1.0 mount.

Reject a response whose data area extends past the received length, with the -EINVAL that validate_t2() returns for the other malformed transaction responses. cifs_query_path_info() and cifs_backup_query_path_info() still read a whole entry from a data area that may be smaller than one; that is not changed here.

A conforming server is not affected. The data block of a transaction response is part of the SMB, so DataOffset + DataCount cannot exceed the smbCalcSize() bytes that SendReceive() copies; coalesce_t2() appends each secondary response to the data area and adds its length to both DataCount and the byte count, which keeps that relation.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel SMB client implementation contains a critical out-of-bounds read vulnerability within the directory enumeration functions CIFSFindFirst and CIFSFindNext. This flaw arises from an insufficient validation of response boundaries during the processing of TRANS2_FIND_FIRST2 and TRANS2_FIND_NEXT2 transactions. Specifically, while the validate_t2 function correctly bounds DataOffset at 1024 bytes and ensures that ParameterCount plus DataCount does not exceed the total byte count provided by the transport layer, it fails to verify that the sum of DataOffset and DataCount remains within the actual length of the received response buffer. This gap in boundary checking allows a malicious or malformed server response to specify a data area that extends beyond the end of the allocated memory region containing the SMB transaction reply.

The operational mechanics of this vulnerability are tied to how the CIFS client manages network buffers. The smb_init function places both the request and the corresponding response within the same cifs_request allocation, and cifs_buf_get clears only the beginning of this buffer rather than the entire structure. When a server sends a short response where the declared data area extends past its actual end, the pointer srch_entries_start is calculated based on DataOffset plus the base address. Because the validation logic does not account for the total received length relative to this offset, the resulting pointer may reference memory belonging to the previously sent request or uninitialized portions of the allocation buffer. Consequently, subsequent parsing functions interpret these out-of-bounds bytes as valid directory entries rather than rejecting the malformed packet immediately.

The impact of this vulnerability is significant due to the specific behavior of different entry processing functions within the kernel. While cifs_readdir and find_cifs_entry perform some checks against the end of the SMB structure for all but the first entry, they still operate on potentially corrupted data if the initial pointer is misaligned. More critically, the functions cifs_query_path_info and cifs_backup_query_path_info read the very first directory entry without any boundary check at all. Although these reads remain within the allocated memory region to avoid immediate kernel panic or segmentation fault in most cases, they retrieve stale request data or uninitialized heap content as if it were legitimate file system metadata from the server. This constitutes an out-of-bounds information disclosure vulnerability where sensitive internal state or previous network traffic details can be exposed through directory listing operations.

From a threat modeling perspective, this flaw aligns with CWE-125 Out-of-bounds Read and is exploitable under specific conditions requiring SMB version 1 negotiation. Since SMB1 is not negotiated by default in modern Linux distributions, an attacker must either coerce the client into using vers=1.0 or exploit environments where legacy protocol support remains enabled. The attack vector falls under MITRE ATT&CK techniques related to Network Service Scanning and potentially Data from Information Repositories if the leaked data contains sensitive file system structures. A conforming server that strictly adheres to SMB specifications will not trigger this vulnerability because its transaction response data blocks are correctly sized such that DataOffset plus DataCount never exceeds the smbCalcSize bytes copied by SendReceive, ensuring internal consistency checks pass safely.

To mitigate this risk, the kernel has been patched to reject any response where the calculated end of the data area extends past the received length, returning an -EINVAL error consistent with other malformed transaction handling in validate_t2. This change effectively closes the primary exploitation path for out-of-bounds reads during directory enumeration. However, it is important to note that this specific patch does not address a secondary issue where cifs_query_path_info and cifs_backup_query_path_info may still read incomplete entries if the data area is smaller than a single entry structure; that remains an unresolved edge case in the current fix set. Administrators should ensure SMB1 support is disabled unless absolutely necessary for legacy compatibility, as this protocol version carries inherent risks beyond just this specific kernel flaw.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00224

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!