CVE-2026-89631: smb: client: reject a tree connect response whose byte count is too small
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 sizet. The later subtraction wraps the u16 bytesleft, and that is what bounds cifsstrndupfromutf16(): a bound of up to 65535 against a ~16 KB cifsreqpoolp 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 smbeiotrace entry, which mode(byte) cannot represent, so the attribute goes with it.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed?
Linux systems acting as SMB clients are exposed when they process a Tree Connect response from an SMB server. The issue is in the client-side CIFSTCon() response parsing path.
What does an attacker need to exploit this?
An attacker needs an SMB server, or control over an SMB server response, that can send a Tree Connect response with a ByteCount of 0 or 1. Such a response is nonconformant because the parser requires at least two bytes.
What is the impact of a malformed response?
The undersized ByteCount can cause the client to use an excessively large bound while processing UTF-16 data, reading beyond the approximately 16 KB request-pool slab object. The resulting bytes can reach userspace through tcon->nativeFileSystem in /proc/fs/cifs/DebugData.