CVE-2026-99380: smb: client: validate NT transaction response layout and offsets
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: client: validate NT transaction response layout and offsets
validate_ntransact() assumes that the response uses the fixed 18-word NT transaction layout. A different WordCount makes get_bcc() locate the byte count at a different offset from pSMBr->ByteCount, allowing the subsequent bounds checks to use inconsistent response boundaries.
The function also turns the 32-bit ParameterOffset and DataOffset fields into pointers before checking their bounds. On a 32-bit client, a large offset can wrap the pointer below end_of_smb and pass the one-sided pointer comparison. The caller then dereferences the parameter pointer or copies from the data pointer.
Require the expected WordCount before reading the byte count. Check each offset and count against the received SMB length as integers before forming either pointer. Use subtraction after validating the offset so that the range checks cannot overflow.
The Linux kernel CVE team has assigned CVE-2026-99380 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.16 with commit 0a4b92c05ed02ad7abdd165823eaf4bbcb33ae5c and fixed in 6.18.61 with commit 520b48753e3c54172a078e7e4b82aec83ae2e08d Issue introduced in 2.6.16 with commit 0a4b92c05ed02ad7abdd165823eaf4bbcb33ae5c and fixed in 7.3.2 with commit d55c0c19b0d1f5c0101f9aa3b60534b6d6e11052 Issue introduced in 2.6.16 with commit 0a4b92c05ed02ad7abdd165823eaf4bbcb33ae5c and fixed in 7.4-rc1 with commit 83d0d5e0ca22233c75daf139ec0063b9d2ff1ac7
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-99380
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/client/cifssmb.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/520b48753e3c54172a078e7e4b82aec83ae2e08d https://git.kernel.org/stable/c/d55c0c19b0d1f5c0101f9aa3b60534b6d6e11052 https://git.kernel.org/stable/c/83d0d5e0ca22233c75daf139ec0063b9d2ff1ac7