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.
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.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
None |
| User Interaction |
None |
Availability Impact |
High |
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.
CVSS 3.1