Skip to contentSkip to conversation

CVE-2026-89631: smb: client: reject a tree connect response whose byte count is too small

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 11

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

smb: client: reject a tree connect response whose byte count is too small

CIFSTCon() bounds its strnlen() over the byte area with the server's ByteCount minus two, which for ByteCount 0 or 1 goes negative as an int and converts to a huge size_t. The later subtraction wraps the __u16 bytes_left, and that is what bounds cifs_strndup_from_utf16(): a bound of up to 65535 against a ~16 KB cifs_req_poolp object runs off the end of the slab object, and the bytes reach userspace through tcon->nativeFileSystem in /proc/fs/cifs/DebugData.

Reject a byte area too small for what the parser consumes. Two bytes is the least it can consume, and no conformant response carries fewer. The new trace point is the 129th smb_eio_trace entry, which __mode(byte) cannot represent, so the attribute goes with it.

The Linux kernel CVE team has assigned CVE-2026-89631 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.30 with commit cc20c031bb067eb3280a1c4b5c42295093e24863 and fixed in 6.18.51 with commit 3be89e8039a85fa3b6cd5f9dcc4c1459eb356c2d
	Issue introduced in 2.6.30 with commit cc20c031bb067eb3280a1c4b5c42295093e24863 and fixed in 7.2.4 with commit 411e484fe71a7f1028de617447edad9cb6d9d68a
	Issue introduced in 2.6.30 with commit cc20c031bb067eb3280a1c4b5c42295093e24863 and fixed in 7.3-rc1 with commit 65deb18359341141d37dc86fc7853511be3c87a7

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-89631

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
fs/smb/client/trace.h

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/3be89e8039a85fa3b6cd5f9dcc4c1459eb356c2d
	https://git.kernel.org/stable/c/411e484fe71a7f1028de617447edad9cb6d9d68a
	https://git.kernel.org/stable/c/65deb18359341141d37dc86fc7853511be3c87a7