CVE-2026-99324: Linux kernel ksmbd reads past its response buffer when padding the last response of a compound

ByLinuxtastic

December 1, 2026 #CVE, #Linux Kernel

SMB2 lets a client chain several commands into one compound request, and the server’s responses are chained back with each one aligned to eight bytes. The kernel CNA record says ksmbd did that alignment by “growing the final iov and the RFC1002 length” of the last response, while smb2_allocate_rsp_buf() “allocates exactly response_sz”. A command can therefore “fill the response buffer to within 7 bytes of its end, for example a QUERY_INFO whose output is bounded only by the space left”, and “the padding can then run past the allocation, and ksmbd_tcp_writev() reads those bytes when it sends the response”, which is the KASAN “slab-out-of-bounds in _copy_from_iter” in the record. Red Hat rates it Important and scores it 7.1 as an information leak and crash reachable by an authenticated client; Ubuntu Medium, SUSE moderate. If a host runs ksmbd, upgrade it to a kernel at or above 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 or 7.3.2 and reboot; Samba’s smbd does not share this code.

CVE-2026-99324 at a glance.

ComponentLinux kernel, the in-kernel SMB server: smb2_allocate_rsp_buf() and the compound response handling in fs/smb/server/smb2pdu.c, the ksmbd module
Affected versionsmainline 5.15 up to 7.4-rc1 (from commit e2f34481, “cifsd: add server-side procedures for SMB3”); 5.15.x below 5.15.226, 6.1.x below 6.1.193, 6.6.x below 6.6.163, 6.12.x below 6.12.117, 6.18.x below 6.18.61, 7.3.x below 7.3.2. Kernels before 5.15 do not have ksmbd and are not affected
Fixed inmainline 7.4-rc1 (commit 714f2772, the one Debian and Ubuntu cite) and stable 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61, 7.3.2; seven fix commits in the record. The fix allocates room for the padding when the request is a compound, “as smb2_read() and smb2_read_pipe() do for their payloads”; response_sz is unchanged and kvzalloc() zeroes the extra bytes
SeverityRed Hat Important, CVSS 3.1 7.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H), CWE-125 (out-of-bounds read), score marked preliminary; Ubuntu Medium, CVSS 4.0 5.3 (VC:L); SUSE moderate, 4.3 (C:L only); the kernel CNA gives no score and NVD is Received with no score, CWE or CPE
Exploited in the wildNot on the CISA KEV catalogue (2026.11.30). EPSS 0.00221 (14th percentile) on 1 December 2026
Who is exposedHosts that serve SMB with ksmbd rather than Samba, to any client that can authenticate (PR:L) and send a compound request; guest or anonymous shares extend that to anyone who can reach port 445. Red Hat’s statement is that ksmbd “is not enabled by default” on RHEL, where Samba is the supported implementation, and that only hosts that “have explicitly enabled and configured” it are exposed. Samba’s smbd and SMB clients are not in range
PublishedCVE record 19 November 2026 (kernel CNA, updated 23 November with the older stable backports); this page built 1 December 2026, last updated 1 December 2026

What it is

A compound request arrives as several SMB2 commands in one message, each header pointing to the next, and the server answers with its responses chained the same way, which requires every response but the last to start on an eight-byte boundary. ksmbd met that by padding the previous response when it appended the next, and by padding the final one too, growing the last iov entry and the NetBIOS length to cover the alignment. The buffer behind that iov was sized to response_sz exactly, so a response that legitimately used all but a few bytes of it left the padding with nowhere to go. The record’s example is a QUERY_INFO “whose output is bounded only by the space left”: a client asks for as much as will fit, the response fills the buffer to within seven bytes of its end, and the alignment reaches past it.

Nothing is written out of bounds; what happens is that ksmbd_tcp_writev() hands the oversized iov to the socket and the kernel copies up to seven bytes of whatever follows the allocation into the reply, which is why Red Hat scores confidentiality low and why KASAN reports the read in _copy_from_iter() under tcp_sendmsg_locked(). On a kernel without KASAN the same read either leaks adjacent slab memory or, at the end of a mapping, faults the server thread, which is the availability half of Red Hat’s vector. The client needs a session to send a compound, so the attacker is an authenticated user of the share, or anyone at all on a guest share.

The fix commit on GitHub, by Ian Bridges and taken by Namjae Jeon, adds a pad_sz in smb2_allocate_rsp_buf() computed when the request’s NextCommand is set, ALIGN(sz - sizeof(__be32), 8) - (sz - sizeof(__be32)), and allocates sz + pad_sz with kvzalloc() so that the padding is both inside the allocation and zero; ten lines added, three removed, in fs/smb/server/smb2pdu.c. git.kernel.org and lore.kernel.org refused our reader, so the backports are described from the record and the mainline commit from its GitHub mirror.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one.

DistributionStatusFixed package
AlpineNot consulted for this page—
DebianFixed in trixie (6.12.117-1), trixie-security (6.12.118-1), forky and sid (7.3.6-1) and in bookworm’s linux-6.12 backport (6.12.117-1~deb12u1, DLA-4927-1); bookworm’s own 6.1 kernel (6.1.192-3) vulnerable; no DSAtrixie 6.12.117-1; unstable 7.3.3-1; bookworm linux-6.12 6.12.117-1~deb12u1; nothing for bookworm’s 6.1 on 1 December 2026
UbuntuMedium; linux needed in 24.04 LTS and 22.04 LTS, pending in 26.10 (7.3.0-12.13) and 26.04 LTS (7.0.0-45.45); 20.04 and 18.04 not affected (no ksmbd); the cloud, lowlatency, realtime and raspi kernels vulnerable on 22.04 and later; no USNnothing released on 1 December 2026
RHEL, Rocky, Alma, CentOS StreamImportant, 7.1, CWE-125 (bug 2576743); no errata on 1 December; the per-product table did not render; ksmbd “is not enabled by default” on RHELnot yet
openSUSE/SLEmoderate, 4.3, state Pending, bug 1291008; released for openSUSE Tumbleweed; affected on SLES 15 SP7, 16.0 and 16.1, SUSE Linux Micro 6.x and Leap 16.x; SLE Micro 5.4 and 5.5 and the pre-5.15 lines not affectedTumbleweed 7.3.6-2.1; nothing for SLE on 1 December 2026
Fedora, Arch; self-built kernelsNot consulted; upstream stable versions apply5.15.226 / 6.1.193 / 6.6.163 / 6.12.117 / 6.18.61 / 7.3.2 or later

How to check

Three questions, in order: which kernel is running, does this host serve SMB with ksmbd at all, and who can get a session. Most Linux file servers run Samba and stop at the second question.

# 1. the running kernel (compare with the fixed stable version for its series)
uname -r

# 2. is ksmbd loaded and serving? (Samba's smbd is a different server and is not affected)
lsmod | grep -E '^ksmbd'
systemctl is-active ksmbd 2>/dev/null; pgrep -a ksmbd.mountd
ss -tlnp | grep -E ':445 '

# 3. who can authenticate: the shares, and whether any allow guest access
grep -nE '^\s*(\[|guest|map to guest)' /etc/ksmbd/ksmbd.conf 2>/dev/null

A kernel at or above the fixed stable version for its series is done. A host with no ksmbd module and nothing but smbd on 445 is not running this code and is not reachable by this bug. A ksmbd host is exposed to every account that can open a session, and a share with guest access makes that everyone who can reach the port; the fixed kernel is the only thing that closes it.

How to fix it

Install the fixed kernel and reboot; ksmbd is a kernel module and the response allocation stays as it is until the host boots the new image. Debian trixie and bookworm’s 6.12 backport had the fix out on 1 December; Ubuntu, Red Hat and SUSE’s enterprise kernels were pending.

# Debian trixie / forky / sid, and bookworm on the linux-6.12 backport
apt update && apt install linux-image-amd64 && systemctl reboot       # or linux-image-arm64
# Ubuntu, RHEL family, SUSE: when the pending builds land
apt update && apt full-upgrade && systemctl reboot
dnf upgrade kernel && systemctl reboot
zypper patch && systemctl reboot
uname -r

Until the reboot, the controls are the usual ones for a file server: no guest shares on networks you do not control, and the port reachable only from the clients that need it. What not to do: do not read “out-of-bounds read” as harmless because nothing is written, since up to seven bytes of kernel memory per response is a leak any authenticated user can repeat; and do not switch a ksmbd host to Samba in a hurry as a mitigation, since the share semantics differ and the kernel update is the smaller change.

Sources

  • CVE-2026-99324 at CVE.org — the kernel CNA record (19 November 2026, updated 23 November): the commit message with the QUERY_INFO example and the KASAN trace through ksmbd_tcp_writev(), the git and version ranges, fs/smb/server/smb2pdu.c
  • Fix commits on git.kernel.org: 714f2772 (mainline, 7.4-rc1) and the backports 002e425e, b663b29e, 79b12c8b, f4d6f211, 3092d8a5, 52bda0cf; git.kernel.org refuses automated readers, so the mainline commit was read on GitHub: Ian Bridges, committed by Namjae Jeon, the pad_sz change in smb2_allocate_rsp_buf()
  • NVD entry — Received on 19 November, carrying the CNA’s original four commits and ranges; no NVD score, CWE or CPE on 1 December
  • Distribution trackers: Debian (trixie 6.12.117-1 fixed, DLA-4927-1 for bookworm’s 6.12, bookworm 6.1 vulnerable) · Ubuntu (Medium, 5.3; 24.04 and 22.04 needed, 26.x pending, 20.04 not affected) · Red Hat (Important 7.1, CWE-125, no errata; bug 2576743) · SUSE (moderate 4.3, Tumbleweed 7.3.6-2.1; bug 1291008)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00221 (percentile 0.135) on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.