CVE-2026-89631 PUBLISHED

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

Assigner: Linux
Reserved: 11.09.2026 Published: 11.09.2026 Updated: 13.09.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS Score: 9.1

AV:N - CIFSTCon() parses a TREE_CONNECT_ANDX response received over TCP (typically port 445) from the SMB peer, so a malicious or compromised CIFS server supplies the undersized ByteCount remotely. AC:L - A server that returns success with ByteCount 0 or 1 triggers the integer underflow and wrapped 65535-byte bound deterministically; CONFIG_CIFS_ALLOW_INSECURE_LEGACY defaults to y, and no race or uncontrolled memory layout is required. PR:N - The attacker is the remote SMB server (or a MITM on unsigned SMB1); the client authenticates to that peer, so no account, capability, or privilege on the victim host is required. UI:N - Existing SMB1 mounts, IPC tcons, automounts, fstab, and cifsroot reconnect via cifs_tree_connect() after a server-induced TCP drop, so the crafted TREE_CONNECT response is processed without contemporaneous user action. S:U - The out-of-bounds slab read, kernel-memory leak, and possible oops remain inside the client kernel's security authority and do not cross a VM, IOMMU, or sandbox boundary. C:H - ByteCount underflow wraps the __u16 bound to up to 65535 bytes against a ~16KB cifs_request slab, so cifs_strndup_from_utf16() copies adjacent kernel heap into tcon->nativeFileSystem, which is then exposed through /proc/fs/cifs/DebugData. I:N - The defect is an out-of-bounds read copied into a newly allocated, correctly sized string; it does not write outside that allocation or provide an arbitrary-write or control-flow primitive. A:H - strnlen(), kstrndup(), and cifs_utf16_bytes() walk tens of kilobytes past the cifs_request object into unmapped or guarded pages, causing a kernel oops or panic that a malicious peer can retrigger on reconnect.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from cc20c031bb067eb3280a1c4b5c42295093e24863 to 3be89e8039a85fa3b6cd5f9dcc4c1459eb356c2d (excl.)
  • affected from cc20c031bb067eb3280a1c4b5c42295093e24863 to 411e484fe71a7f1028de617447edad9cb6d9d68a (excl.)
  • affected from cc20c031bb067eb3280a1c4b5c42295093e24863 to 65deb18359341141d37dc86fc7853511be3c87a7 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 2.6.30 is affected
  • unaffected from 0 to 2.6.30 (excl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.4 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References