CVE-2026-139229

ksmbd: reject foreign RPC pipe handles on IPC$ read and write

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: reject foreign RPC pipe handles on IPC$ read and write

RPC pipe handles on IPC$ are allocated from a single server-global IDA,
and ksmbd.mountd looks a pipe up by handle alone, with no session
information. smb2_read_pipe() and smb2_write_pipe() take the handle
straight from the client request (VolatileFileId) and pass it to the
daemon without checking that the requesting session opened it. An
authenticated user can therefore issue an SMB2 READ or WRITE on IPC$
with another session's handle and receive that session's in-flight
DCERPC response, or write attacker-chosen bytes into its pipe stream.
A tree connect to IPC$, which every RPC client already has, is the only
requirement.

Validate ownership before the transfer, the way the sibling pipe paths
already do: under sess->rpc_lock, ksmbd_session_rpc_method() returns 0
for a handle the session did not open. smb2_get_info_file_pipe() and
the FSCTL_PIPE_TRANSCEIVE ioctl already reject such handles; read and
write were the remaining gap. Reject them with STATUS_FILE_CLOSED, as
the ioctl path does.

Analysis

AI-generated

Technical impact

The ksmbd component in the Linux kernel lacks ownership validation for RPC pipe handles used on the IPC$ share. An authenticated user can supply a handle that was not opened by their own session and issue SMB2 READ or WRITE requests. The kernel then forwards the request to the sasemount daemon without verifying session ownership, enabling the attacker to read or inject data into another session’s pipe stream. This can expose confidential information or allow the attacker to tamper with the target session, potentially opening the door to further lateral movement. The weakness is an improper authorization flaw (CWE‑285).

Affected Systems

Affected systems are all Linux kernel distributions that include ksmbd before the patch in commit 7087474b. The vulnerability applies to any kernel running a ksmbd module that processes SMB2 pipe operations on the IPC$ share, regardless of upstream vendor. It is not vendor‑specific beyond the Linux kernel itself; any distribution using an unpatched kernel is susceptible.

Risk and Exploitability

The CVSS score is not provided in the data, and EPSS is listed as unavailable, but KEV indicates the vulnerability is not currently catalogued as known exploited. The attack does not require special privileges beyond a valid SMB authentication and only needs to target the generic IPC$ share that every RPC client can connect to. Therefore the risk is moderate to high for environments that allow authenticated SMB clients to use IPC$ and that rely on the ksmbd service. Once an attacker gains authenticated access, they can read or write arbitrary data in another session’s pipe, enabling data leakage or tampering with a likelihood of exploitation that is reasonable for unpatched systems.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that adds ownership validation for RPC pipe handles in ksmbd (commit 7087474b) by upgrading to a kernel version that includes the fix.
  • Reboot or reload the new kernel to ensure ksmbd is running with the corrected code.
  • If immediate kernel upgrade is not possible, restrict IPC$ access in the Samba configuration by removing the IPC$ share or disabling RPC pipe operations until the kernel update can be applied.

Generated by OpenCVE AI on November 30, 2026 at 20:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-285
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: reject foreign RPC pipe handles on IPC$ read and write RPC pipe handles on IPC$ are allocated from a single server-global IDA, and ksmbd.mountd looks a pipe up by handle alone, with no session information. smb2_read_pipe() and smb2_write_pipe() take the handle straight from the client request (VolatileFileId) and pass it to the daemon without checking that the requesting session opened it. An authenticated user can therefore issue an SMB2 READ or WRITE on IPC$ with another session's handle and receive that session's in-flight DCERPC response, or write attacker-chosen bytes into its pipe stream. A tree connect to IPC$, which every RPC client already has, is the only requirement. Validate ownership before the transfer, the way the sibling pipe paths already do: under sess->rpc_lock, ksmbd_session_rpc_method() returns 0 for a handle the session did not open. smb2_get_info_file_pipe() and the FSCTL_PIPE_TRANSCEIVE ioctl already reject such handles; read and write were the remaining gap. Reject them with STATUS_FILE_CLOSED, as the ioctl path does.
Title ksmbd: reject foreign RPC pipe handles on IPC$ read and write
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM