CVE-2026-139231

smb: smbdirect: don't WARN on an unexpected receive opcode

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

smb: smbdirect: don't WARN on an unexpected receive opcode

The receive completion handlers smbdirect_connection_recv_io_done(),
smbdirect_accept_negotiate_recv_done() and
smbdirect_connect_negotiate_recv_done() verify that the completion is a
regular receive with WARN_ON_ONCE(wc->opcode != IB_WC_RECV).

But wc->opcode is controlled by the remote peer: a posted receive work
request is consumed not only by an incoming SEND, but also by an RDMA
Write with Immediate, which completes as IB_WC_RECV_RDMA_WITH_IMM. An
unauthenticated peer can transmit such a message, even before the
negotiate completes, so it reaches the accept/connect negotiate
handlers as well. With panic_on_warn set this is a remote denial of
service, and otherwise it still taints the kernel and spams the log for
something a peer can trigger at will.

The opcode check itself was inherited from the original client and
server recv_done() handlers (fs/smb/client/smbdirect.c and
fs/smb/server/transport_rdma.c), where an unexpected opcode was simply
logged and the connection was torn down. Only the WARN_ON_ONCE() was
added on top during the socketization rework. Drop the WARN_ON_ONCE()
and keep the existing graceful error path, which logs the unexpected
opcode (unless the status is IB_WC_WR_FLUSH_ERR) and tears the
connection down.

Analysis

AI-generated

Technical impact

A remote party can send an RDMA Write with Immediate that completes as IB_WC_RECV_RDMA_WITH_IMM, bypassing the normal receive flow. The kernel treats the opcode as an unexpected value and executes WARN_ON_ONCE. If panic_on_warn is set this leads to a kernel panic, otherwise the kernel becomes tainted and logs are flooded, which constitutes a denial of service and potential information leakage.

Affected Systems

The flaw resides in the Linux kernel’s SMB RDMA implementation. Linux kernel builds prior to inclusion of the patch that removes the WARN_ON_ONCE are affected. The exact version range is not explicitly enumerated, so any kernel that has not integrated the commit will be vulnerable.

Risk and Exploitability

The CVSS score is not provided, and the EPSS is not available. The issue is not listed in CISA’s KEV catalog, indicating no widely used exploit yet. The attack vector requires control over an RDMA network or the ability to send rdma immediate writes to a vulnerable host, which is specialized but possible in untrusted or cross‑site RDMA environments. The risk remains moderate, with the potential for a catastrophic kernel crash if the host runs with panic_on_warn enabled.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that removes the WARN_ON_ONCE and retains the graceful error path for SMB RDMA operators.
  • If a kernel update is not yet available, disable panic_on_warn (e.g., sysctl kernel.panic_on_warn=0) to prevent a kernel panic, while accepting that log spam may still occur.
  • Configure firewall or network segmentation to block or restrict RDMA traffic from untrusted peers, limiting the attacker’s ability to send malicious opcodes.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: smb: smbdirect: don't WARN on an unexpected receive opcode The receive completion handlers smbdirect_connection_recv_io_done(), smbdirect_accept_negotiate_recv_done() and smbdirect_connect_negotiate_recv_done() verify that the completion is a regular receive with WARN_ON_ONCE(wc->opcode != IB_WC_RECV). But wc->opcode is controlled by the remote peer: a posted receive work request is consumed not only by an incoming SEND, but also by an RDMA Write with Immediate, which completes as IB_WC_RECV_RDMA_WITH_IMM. An unauthenticated peer can transmit such a message, even before the negotiate completes, so it reaches the accept/connect negotiate handlers as well. With panic_on_warn set this is a remote denial of service, and otherwise it still taints the kernel and spams the log for something a peer can trigger at will. The opcode check itself was inherited from the original client and server recv_done() handlers (fs/smb/client/smbdirect.c and fs/smb/server/transport_rdma.c), where an unexpected opcode was simply logged and the connection was torn down. Only the WARN_ON_ONCE() was added on top during the socketization rework. Drop the WARN_ON_ONCE() and keep the existing graceful error path, which logs the unexpected opcode (unless the status is IB_WC_WR_FLUSH_ERR) and tears the connection down.
Title smb: smbdirect: don't WARN on an unexpected receive opcode
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-20

    Improper Input Validation

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