CVE-2026-99273: ksmbd: reserve space for the UTF-16 terminator in stream info
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: reserve space for the UTF-16 terminator in stream info
smb_strtoUTF16() always writes a terminating zero UTF-16 unit after the converted characters, but get_file_stream_info() budgets only sizeof(struct smb2_file_stream_info) + streamlen * 2 for a stream entry and sizeof(struct smb2_file_stream_info) + 7 * 2 for the trailing "::$DATA" entry. When an entry exactly fills the 448-byte small response buffer, the terminator is written two bytes past the allocation.
Reserve one extra UTF-16 unit in both budget checks. The terminator is not part of the wire format, so the reported lengths are unchanged.
The Linux kernel CVE team has assigned CVE-2026-99273 to this issue.
Affected and fixed versions
===========================
Fixed in 6.18.61 with commit 06a751809ebd33e95b05bf733697318a17a4872b Fixed in 7.3.2 with commit 0e64f89563164719ceb1aa33f2a8bfd6391fa340 Fixed in 7.4-rc1 with commit a025c4991a7d83edc4dd339e3ea86d8ff6226eca
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-99273
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/server/smb2pdu.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/06a751809ebd33e95b05bf733697318a17a4872b https://git.kernel.org/stable/c/0e64f89563164719ceb1aa33f2a8bfd6391fa340 https://git.kernel.org/stable/c/a025c4991a7d83edc4dd339e3ea86d8ff6226eca