CVE-2026-99388: Linux kernel ksmbd reads and writes past its buffer on crafted SMB Direct RDMA descriptors

ByLinuxtastic

November 30, 2026 #CVE, #Linux Kernel

The kernel’s in-tree SMB server, ksmbd, can serve shares over SMB Direct, where the data moves by RDMA rather than through the TCP stream. In the code that processes a client’s list of RDMA buffer descriptors, an oversized descriptor that was clamped to fit also zeroed the remaining-length counter, and the shared accounting then subtracted the clamped length from zero. The counter wrapped, the next descriptor was processed against a huge “remaining” buffer, and memory beyond the local buffer went into the transfer. A connected client can turn that into an out-of-bounds kernel write with an SMB WRITE, or an out-of-bounds kernel read with an SMB READ, by sending several descriptors with an oversized one before the last. Update the kernel to 7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193 or 5.15.226 (or your distribution’s build) and reboot; until then, stop ksmbd or take its RDMA listener off any network with untrusted clients. Hosts that serve SMB with user-space Samba, or do not serve SMB at all, are not affected.

CVE-2026-99388 at a glance.

ComponentLinux kernel, the SMB Direct (RDMA) transport shared by ksmbd (fs/smb/smbdirect/rw.c, smbdirect_connection_rdma_xmit()); reachable only on a host running the in-kernel ksmbd server with SMB Direct over an RDMA-capable NIC
Affected versionsMainline from 6.6 and the stable backports 5.15.145 onwards, 6.1.52 onwards and 6.4.15 onwards (the record lists several introducing commits); every stable series up to the fixes below
Fixed inMainline 7.4-rc1 (commit 7193241a, “smb: smbdirect: fix buffer length underflow in RDMA transfers”); stable 7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193, 5.15.226. Distribution kernels below
SeverityKernel CNA CVSS 3.1 8.8 High (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H); NVD has not scored it. Red Hat Important, 8.8 (same vector, CWE-787, draft); SUSE important, 8.8. All three agree: a network attacker with a share login, low complexity, full impact
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026. EPSS 0.0066 (47th percentile) on 30 November 2026
Who is exposedHosts serving SMB with ksmbd over SMB Direct: an RDMA NIC (RoCE, iWARP or InfiniBand) and the SMB Direct listener on TCP 5445, with clients that can authenticate to a share and are not fully trusted. The attacker needs a session (PR:L), which on a guest-accessible share is anyone. Red Hat’s statement: RHEL mainly uses user-space Samba and the NVMe-style RDMA path is a narrow configuration. Samba (smbd) users, ksmbd over plain TCP, and hosts without RDMA hardware are not affected
PublishedKernel CNA record 19 November 2026 (updated 23 November); this page built 30 November 2026, last updated 30 November 2026

What it is

With SMB Direct, a client does not stream file data through the SMB connection; it hands the server a list of remote buffer descriptors and the server’s RDMA engine reads from or writes to the client’s memory directly. The server has to map that list onto its own local buffer, and the loop that does so keeps a count of how much local buffer remains. The commit message describes the slip: when a remote descriptor is larger than what remains, the code clamps the descriptor’s length and sets the remaining count to zero; the common accounting code that follows then subtracts the clamped length from that zero, and the unsigned count wraps to a very large number. If the client supplied another descriptor after the oversized one, the loop processes it against that wrapped count and “includes memory beyond the local buffer in the RDMA transfer”.

The direction of the SMB request decides what the extra memory does. An SMB WRITE makes the server pull the client’s data into local memory, so the overrun is an out-of-bounds kernel write with attacker-controlled bytes; an SMB READ pushes local memory to the client, so it is an out-of-bounds kernel read that leaks whatever follows the buffer. The fix is one line in spirit: remove the premature assignment of zero, because subtracting the clamped length already consumes the remainder, the next iteration then stops, and only descriptors that fit are turned into RDMA work requests. The file is fs/smb/smbdirect/rw.c, the SMB Direct layer that was split out from ksmbd and the CIFS client; the request types named in the record (WRITE from a client, READ from a client) are the server’s.

Red Hat scores it exactly as the kernel CNA does, 8.8, and its statement narrows the population rather than the severity: the in-kernel ksmbd server, with RDMA SMB Direct in use, on a NIC that supports it. That is a storage-appliance and lab configuration far more than a general server one, which is why RHEL 6 to 9 are not affected at all and only RHEL 10 carries the code. The git.kernel.org commit pages refuse automated readers, so this page describes the fix from the CNA’s copy of the commit message and names the file from the record’s programFiles, not from the diff.

Who is affected on Linux

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

DistributionStatusFixed package
Debian bookworm, trixie, forky, sidFixed in trixie, forky, sid and bookworm’s linux-6.12 (DLA-4927-1); vulnerable in bookworm’s 6.1 kerneltrixie linux 6.12.117-1 (security 6.12.118-1), forky and sid 7.3.6-1, bookworm-security linux-6.12 6.12.117-1~deb12u1; bookworm linux 6.1.176-1 and 6.1.192-3 still vulnerable on 30 November
Ubuntu 20.04 to 26.04Tracker unreachable on 30 November 2026Ubuntu’s CVE page refused automated readers when this page was built, so no priority or per-release linux status is reproduced here; the tracker link is the current word
RHEL 10 (and rebuilds)Important (8.8); RHEL 10 affected, no erratum; RHEL 6 to 9 not affectedRHEL 10 kernel “Affected” with no fixed build on 30 November; OpenShift CoreOS 10 affected, CoreOS 8 and 9 not
SUSE SLES 15 SP6, SP7, 16.0, 16.1, openSUSE Leap 15.6important, pendingSLES 15 SP7 kernel-default, SLES 16.0 and 16.1, SLES 15 SP6-LTSS and openSUSE Leap 15.6 “Affected”; SLE Micro 5.4 and 5.5 not affected (SUSE bugs 1291071 and 1291207)
Fedora, Arch, AlpineNot consultedtrackers not read for this page; these track the stable series above, so 7.3.2 / 6.18.61 and later are the builds to look for
Self-built, vendor and NAS kernelsAffected below the fixed stable releases where ksmbd is built with SMB Direct7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193, 5.15.226 or later

How to check

Three questions: is ksmbd running at all, does the host have RDMA hardware and the SMB Direct listener up, and is the kernel older than the fix. The first clears every Samba host.

# 1. the in-kernel server: no ksmbd module means this bug cannot be reached
lsmod | grep -E '^ksmbd'; systemctl is-active ksmbd 2>/dev/null
pgrep -a smbd                                  # user-space Samba is a different server and is not affected

# 2. RDMA hardware and the SMB Direct listener (TCP 5445 is the SMB Direct port)
ls /sys/class/infiniband 2>/dev/null || echo "no RDMA devices"
ss -ltnp | grep -E ':(445|5445)\b'
grep -rEi 'rdma|smb.?direct' /etc/ksmbd/ksmbd.conf 2>/dev/null

# 3. the running kernel: affected below 7.3.2 / 6.18.61 / 6.12.117 / 6.6.163 / 6.1.193 / 5.15.226
uname -r
dpkg -l 'linux-image-*' 2>/dev/null | grep '^ii' | awk '{print $2, $3}'   # Debian / Ubuntu
rpm -q kernel 2>/dev/null                                                   # RHEL family / SUSE

No ksmbd module, or only smbd running, means you are done. A ksmbd host with no RDMA device and nothing on 5445 serves SMB over TCP only, and the RDMA transfer code is never entered, so it is a patching chore rather than an exposure. A ksmbd host with an RDMA device, the 5445 listener and an old kernel is the vulnerable configuration; the attacker is anyone who can log in to a share, which on a guest-accessible share means anyone who can reach the port.

How to fix it

Install the fixed kernel and reboot; the server code is in the kernel, so there is no daemon restart that helps.

# Debian trixie, or bookworm with the linux-6.12 kernel (DLA-4927-1) / Ubuntu
apt update && apt install linux-image-amd64        # or your metapackage
# RHEL 10: no erratum on 30 November; SUSE pending
dnf update kernel
zypper patch
reboot
uname -r                                            # must show the fixed build

If you cannot reboot yet, remove the reachable path: stop ksmbd, or keep it but close the SMB Direct port to anything that is not a trusted client, since clients fall back to SMB over TCP when 5445 is unreachable. Do not rely on share permissions as the mitigation: the request is processed before any file is touched, and a read-only share login is enough to send it. And do not switch to Samba in a hurry on the strength of this bug alone; the user-space server is a different code base with its own history, and the kernel update is the fix.

# mitigation: close SMB Direct to untrusted networks (clients fall back to TCP 445)
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/24" port port="5445" protocol="tcp" accept'
firewall-cmd --permanent --remove-port=5445/tcp 2>/dev/null; firewall-cmd --reload
nft add rule inet filter input tcp dport 5445 ip saddr != 10.0.0.0/24 drop
# or stop the in-kernel server outright
systemctl stop ksmbd && modprobe -r ksmbd

Sources

  • CVE-2026-99388 at CVE.org — the kernel CNA record (19 November 2026): the commit message, the affected and fixed ranges, programFiles and the 8.8 vector
  • Fix commit 7193241a (7.4-rc1) — “smb: smbdirect: fix buffer length underflow in RDMA transfers”; git.kernel.org refused automated readers, so the diff was not read for this page
  • NVD entry — Received; only the CNA’s CVSS so far
  • Distribution trackers: Debian (DLA-4927-1) · Ubuntu (unreachable on 30 November) · Red Hat (Important, 8.8, CWE-787) · SUSE
  • EPSS score for this CVE, 30 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 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.