CVE-2026-139229: Linux kernel ksmbd lets one authenticated session read and write another session’s RPC pipe on IPC$

ByLinuxtastic

December 2, 2026 #CVE, #Linux Kernel

Every SMB client that talks DCERPC to a server, for share enumeration, printer lookups or Windows management calls, does so through named pipes on the IPC$ share, and in ksmbd those pipes are serviced by the userspace daemon ksmbd.mountd. The kernel CNA record says the pipe handles “are allocated from a single server-global IDA, and ksmbd.mountd looks a pipe up by handle alone, with no session information”, while the SMB2 READ and WRITE paths “take the handle straight from the client request (VolatileFileId) and pass it to the daemon without checking that the requesting session opened it.” Any authenticated user can therefore read “another session’s in-flight DCERPC response, or write attacker-chosen bytes into its pipe stream.” Red Hat rates it Important at 8.1 for confidentiality and integrity. On hosts running ksmbd with more than one user, upgrade to 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 or later and reboot.

CVE-2026-139229 at a glance.

ComponentLinux kernel, ksmbd SMB server (fs/smb/server/smb2pdu.c: smb2_read_pipe() and smb2_write_pipe(), with the ownership check in ksmbd_session_rpc_method()), module ksmbd and its helper ksmbd.mountd
Affected versionsfrom e2f34481b24d, the commit that merged ksmbd: 5.15 up to 6.1 before 6.1.193, 6.6 before 6.6.163, 6.12 before 6.12.119, 6.18 before 6.18.65, 7.3 before 7.3.6 and 7.4 before 7.4-rc1; the record lists no 5.15 backport, so every 5.15 ksmbd is in range
Fixed inmainline 7.4-rc1 (commit da259950, “reject foreign RPC pipe handles on IPC$ read and write”: the ownership check that the GetInfo and FSCTL_PIPE_TRANSCEIVE paths already made, applied to READ and WRITE, which now fail with STATUS_FILE_CLOSED) and stable 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6; six commits in the record
SeverityRed Hat Important, CVSS 3.1 8.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N, draft, CWE-639 authorisation bypass through user-controlled key), bug 2587245 “ksmbd: Information disclosure via unvalidated RPC pipe handle ownership”; the kernel CNA gives no score and NVD (Received, 30 November) carries none; Ubuntu Medium; SUSE could not be read on 2 December 2026
Exploited in the wildNot on the CISA KEV catalogue (2026.11.30). EPSS 0.00206 (11th percentile) on 1 December 2026
Who is exposedksmbd hosts with more than one account, or with guest access, where sessions overlap: the attacker needs a tree connect to IPC$, “which every RPC client already has”, and a handle number to guess, which the global allocator makes small and sequential. The data at risk is whatever other users’ RPC calls return, share and user listings, printer and registry queries, and the write side lets the attacker inject bytes into a victim’s pipe. Red Hat: RHEL uses Samba and every RHEL kernel is marked not affected
PublishedCVE record 30 November 2026 (kernel CNA); this page built 2 December 2026, last updated 2 December 2026

What it is

SMB file handles are two 64-bit values, a persistent and a volatile id, and for ordinary files ksmbd resolves the volatile id inside the requesting session’s own table, so a handle from another session simply does not resolve. Pipes on IPC$ are different: the kernel asks ksmbd.mountd to open the RPC endpoint and gets back a small integer from one server-wide allocator, and that integer is what goes into the client’s volatile id. The daemon keeps no record of which session the pipe belongs to, so any check has to happen in the kernel, where the session is known.

Three of the four pipe operations made that check. smb2_get_info_file_pipe() and the FSCTL_PIPE_TRANSCEIVE ioctl call ksmbd_session_rpc_method() under sess->rpc_lock, which “returns 0 for a handle the session did not open”, and reject it. READ and WRITE did not: they passed the client’s number straight to the daemon, so a user who guessed a neighbour’s handle, and the handles are allocated from one IDA so a neighbour’s is usually the next integer, could collect the response to a DCERPC request the neighbour had just made, or push bytes into that neighbour’s pipe where they would be parsed as the neighbour’s next RPC fragment. That is a cross-session read of another user’s data and a cross-session write into their protocol stream, which is the shape of the Red Hat score: high confidentiality and integrity impact, no availability impact.

The fix in fs/smb/server/smb2pdu.c makes READ and WRITE validate ownership “the way the sibling pipe paths already do”, returning STATUS_FILE_CLOSED for a foreign handle. The flaw is as old as ksmbd itself, which is why the affected range starts at the 5.15 merge. git.kernel.org refuses automated readers, so the diff is described from the CNA’s copy of the commit message.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 2 December 2026; the link in the row is the tracker page, which will be newer than this one. Only hosts that load ksmbd and run ksmbd.mountd exercise the code.

DistributionStatusFixed package
AlpineNot consulted for this page—
Debianbookworm (6.1.176-1, security 6.1.192-3) vulnerable; trixie (6.12.117-1, security 6.12.118-1) vulnerable; forky and sid (7.3.6-1) fixed; no DSAunstable 7.3.6-1
UbuntuMedium; the linux package is needs evaluation on every release from 14.04 to 26.10 on 2 December 2026, nothing releasednothing on 2 December 2026
RHEL, Rocky, Alma, CentOS StreamImportant, 8.1 (bug 2587245, CWE-639), but kernel and kernel-rt are not affected in RHEL 6 to 10 and every OpenShift RHCOS image: RHEL serves SMB with Samba—
openSUSE/SLENot consulted: suse.com refused the automated reader on 2 December 2026 (client error)—
Fedora, Arch, OpenWrt; self-built kernelsNot consulted; upstream stable versions apply. 5.15 has no listed backport6.1.193 / 6.6.163 / 6.12.119 / 6.18.65 / 7.3.6 or later

How to check

Is ksmbd the SMB server on this host, which kernel is under it, and how many distinct accounts, or guests, can hold sessions at once. The last question decides whether there is anyone to steal from.

# 1. is the in-kernel SMB server loaded and its helper running
lsmod | grep -w ksmbd
pgrep -a ksmbd.mountd; ss -ltnp | grep -E ':445 '

# 2. the running kernel: fixed in 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 or later
uname -r

# 3. how many accounts, whether guests are allowed, and who is connected right now
cut -d: -f1 /etc/ksmbd/ksmbdpwd.db 2>/dev/null | wc -l
grep -iE '^\s*(map to guest|guest account)' /etc/ksmbd/ksmbd.conf 2>/dev/null
ksmbd.control -s 2>/dev/null | grep -iE 'session|connection'

No ksmbd module means the page does not apply; port 445 held by smbd is Samba. A single-user ksmbd, one account and no guest, has no second session to read from and the bug is moot until a second account is added. A multi-user or guest-enabled server on an affected kernel is the case the record describes, and there is nothing in the logs to review: the foreign READ looks like an ordinary pipe read to the server, which is the point of the fix.

How to fix it

Update the kernel and reboot. Until then, reduce the number of sessions that can overlap: no guest access, and shares restricted to the accounts that need them.

# Debian forky / sid (7.3.6-1) carry the fix; bookworm and trixie: watch the tracker row above
apt update && apt install linux-image-amd64 && systemctl reboot
# Ubuntu: needs evaluation on 2 December 2026; once the linux package is released
apt update && apt install linux-generic && systemctl reboot
# RHEL / Rocky / Alma: not affected (Samba, not ksmbd); nothing to do
# Interim: no guests, fewer accounts, and the listener fenced to the LAN
sed -i 's/^\s*map to guest.*/map to guest = never/' /etc/ksmbd/ksmbd.conf
systemctl restart ksmbd
nft add rule inet filter input tcp dport 445 ip saddr != 192.168.1.0/24 drop

What not to do: do not disable IPC$ or the RPC daemon to close the hole; clients use those pipes to enumerate shares and the server stops being browsable, while any session that still opens a pipe remains exposed. Do not assume SMB encryption helps: the read happens inside the server after decryption, between two sessions that are each legitimately encrypted.

Sources

  • CVE-2026-139229 at CVE.org — the kernel CNA record: the global IDA, the VolatileFileId pass-through, the sibling paths that already checked, the version ranges (30 November 2026)
  • Fix commit da259950 (mainline 7.4-rc1, the commit Debian cites) and the stable backports 5daddaa1, c3234ac7, 4133bff4, 8f09e860, 7087474b; git.kernel.org refuses automated readers, so the diff is described from the CNA’s copy of the commit message
  • NVD entry — Received on 30 November 2026; no CVSS metric, CWE or CPE on 2 December 2026
  • Distribution trackers: Debian (bookworm and trixie vulnerable, unstable fixed in 7.3.6-1) · Red Hat (Important 8.1, bug 2587245, CWE-639; every RHEL kernel not affected; the statement on intercepting other sessions’ DCERPC responses) · Ubuntu (Medium, needs evaluation; read from the HTML page, the JSON endpoint refused) · SUSE (refused the automated reader on 2 December 2026)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00206 (percentile 0.113) on 1 December 2026

Related reading

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