CVE-2026-98405: smb: client: fix missing iov bounds check in parse_posix_sids()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix missing iov bounds check in parse_posix_sids()
In parse_posix_sids(), sidsbuf_end is calculated using the server-supplied out_len without being validated against the actual length of the received iov (iov_len).
If a server provides an inflated out_len, sidsbuf_end will point past the end of the iov. This defeats the bounds guards in posix_info_sid_size(), allowing out-of-bounds reads into adjacent kernel memory.
Fix this by rejecting responses where the calculated sidsbuf_end would exceed the received iov boundaries or cause pointer wraparound.
The Linux kernel CVE team has assigned CVE-2026-98405 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.6.32 with commit a90f37e3d7acfd9824f162830583bbf7846fe252 and fixed in 6.6.158 with commit d91b9a3b2b38e5ac1b51e9e5b23fe53ad7b49644 Issue introduced in 6.6.32 with commit a90f37e3d7acfd9824f162830583bbf7846fe252 and fixed in 6.12.112 with commit b862996e5105be1293da9cdc85da77b76021c3bd Issue introduced in 6.6.32 with commit a90f37e3d7acfd9824f162830583bbf7846fe252 and fixed in 6.18.54 with commit 2f8ed71aaaba3bc8b19cd9930cc62e63e142b299 Issue introduced in 6.6.32 with commit a90f37e3d7acfd9824f162830583bbf7846fe252 and fixed in 7.2.8 with commit eac6917a42899aad0617bbf04798c5dd946a1fe5 Issue introduced in 6.6.32 with commit a90f37e3d7acfd9824f162830583bbf7846fe252 and fixed in 7.3-rc4 with commit b09d092eb24ad0110f16a9b7c1ed5d2a0c1733dc
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-98405
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/smb2inode.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/d91b9a3b2b38e5ac1b51e9e5b23fe53ad7b49644 https://git.kernel.org/stable/c/b862996e5105be1293da9cdc85da77b76021c3bd https://git.kernel.org/stable/c/2f8ed71aaaba3bc8b19cd9930cc62e63e142b299 https://git.kernel.org/stable/c/eac6917a42899aad0617bbf04798c5dd946a1fe5 https://git.kernel.org/stable/c/b09d092eb24ad0110f16a9b7c1ed5d2a0c1733dc