CVE-2026-139165

ksmbd: avoid races between named-pipe operations

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: avoid races between named-pipe operations

RPC IPC replies are matched by pipe handle. READ, WRITE, TRANSCEIVE and
CLOSE on the same pipe all use that handle. The session RPC lock protects
the handle table, but is dropped before a pipe I/O request waits for its
reply. Another operation, including CLOSE, can issue a request with the
same handle while that wait is still in progress.

These requests have no separate IPC correlation ID, so overlapping waits
can interfere with reply delivery. CLOSE can also release the handle
before an earlier operation finishes. Protecting table access alone does
not provide the serialization or lifetime needed by an active pipe.

Serialize operations per pipe and keep its state and handle alive until
all users finish. Avoid holding the session table lock across IPC waits,
so a blocked pipe does not hold up unrelated pipes. This also provides
the lifetime needed to retain unread replies in the following patch.

Recheck cancellation, connection release and session teardown after taking
the pipe lock, and mark a removed pipe closed before waiting for its active
operation. Close all session RPC pipes on logoff after the other requests
have drained; keeping the TCP connection open must not retain old handles.
Use standard SMB2 error replies for failed pipe operations while preserving
the selected status.

Analysis

AI-generated

Technical impact

The ksmbd component of the Linux kernel contains a race condition between named‑pipe operations. When a READ, WRITE, TRANSCEIVE or CLOSE request is made on the same pipe, the RPC IPC replies use only the pipe handle and not a separate correlation identifier. The session RPC lock that protects the handle table is released before an I/O request waits for its reply, allowing another operation to issue a request that reuses the same handle while the first wait is still in progress. This overlap can interfere with reply delivery and allows a CLOSE to release the handle before an earlier operation finishes, leading to potentially corrupted or lost replies. The lack of serialization and improper lifetime management of pipe state and handle expose the kernel to a race that can manifest as incorrect IPC behavior and, in worst cases, denial of service by allowing a malicious client to exhaust resources or disrupt normal SMB traffic.

Affected Systems

The issue exists in the generic Linux kernel; any system running an affected kernel version prior to the application of the patch is vulnerable. Affected releases include all kernels that have not incorporated the ksmbd changes associated with the commit that resolves the race.

Risk and Exploitability

No publicly available CVSS, EPSS, or KEV information is listed, but the nature of a race condition between privileged kernel operations suggests a high risk of denial of service or other incorrect kernel behavior. The likelihood of exploitation depends on an attacker’s ability to manipulate SMB client requests toward a target kernel; while no exploit code is reported, the internal race represents a significant vulnerability if leveraged.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel version that includes the ksmbd patch
  • Disable the SMB service on servers where it is not needed
  • Monitor system for SMB‑related error logs and verify stability after the upgrade

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: avoid races between named-pipe operations RPC IPC replies are matched by pipe handle. READ, WRITE, TRANSCEIVE and CLOSE on the same pipe all use that handle. The session RPC lock protects the handle table, but is dropped before a pipe I/O request waits for its reply. Another operation, including CLOSE, can issue a request with the same handle while that wait is still in progress. These requests have no separate IPC correlation ID, so overlapping waits can interfere with reply delivery. CLOSE can also release the handle before an earlier operation finishes. Protecting table access alone does not provide the serialization or lifetime needed by an active pipe. Serialize operations per pipe and keep its state and handle alive until all users finish. Avoid holding the session table lock across IPC waits, so a blocked pipe does not hold up unrelated pipes. This also provides the lifetime needed to retain unread replies in the following patch. Recheck cancellation, connection release and session teardown after taking the pipe lock, and mark a removed pipe closed before waiting for its active operation. Close all session RPC pipes on logoff after the other requests have drained; keeping the TCP connection open must not retain old handles. Use standard SMB2 error replies for failed pipe operations while preserving the selected status.
Title ksmbd: avoid races between named-pipe operations
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

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