Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-139231

published high CVSS 3.1 · 7.5

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

Published
30 Nov 2026, 13:32:50 UTC
Updated
01 Dec 2026, 05:41:56 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxea4151222a93d3bfd5d5c438d1c286a5dcff846c to < 1f53d5fc06bd34f1debc5bc31337a267e76c8a5e · ea4151222a93d3bfd5d5c438d1c286a5dcff846c to < e8592dec2e935befe842f90f4044d210f59c4d30 · Other versions: unaffected Affected Not stated Linux
Linux — Linux7.1 (affected) · 0 to < 7.1 (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

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.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.5 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Scenarios
en: AV:N - The opcode check sits in smbdirect_accept_negotiate_recv_done(). A remote peer reaches it by sending an RDMA Write with Immediate over RoCEv2 or iWARP to ksmbd's SMB Direct listener, which binds INADDR_ANY on port 445 or 5445. That write uses up the posted receive and completes with wc->opcode = IB_WC_RECV_RDMA_WITH_IMM, a value the peer chooses. RoCEv2 and iWARP are routable. AC:L - The peer decides which opcode to send. A zero-length Write-with-Immediate needs no valid rkey, and the QP is set up with IB_ACCESS_REMOTE_WRITE by cm/iwcm, so the WARN_ON_ONCE fires on the first such message without any race or timing condition. PR:N - smbdirect_accept_connect_request() posts the negotiate recv_io before rdma_accept(). The malicious completion therefore arrives before the SMB Direct negotiate and well before any SMB session setup or authentication. UI:N - Once ksmbd is serving SMB Direct, it accepts the attacker's RDMA CM connection and processes the completion without any victim action. S:U - The impact stays in the host kernel that runs the ksmbd SMB Direct transport. No guest/host, IOMMU or sandbox boundary is crossed. C:N - After the WARN_ON_ONCE, the handler takes its normal error path: it logs the opcode and jumps to error/schedule_cleanup. No memory is read out of bounds and nothing is disclosed. I:N - The fix removes only the WARN_ON_ONCE wrapper. The existing teardown already handled an unexpected opcode correctly, so no memory is corrupted and no state is modified. A:H - A peer can trigger the WARN_ON_ONCE in smbdirect_accept_negotiate_recv_done() at will, before authentication. On hosts with panic_on_warn set it panics the kernel, a remote denial of service; on other hosts it taints the kernel and the peer's connection is torn down.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux ea4151222a93d3bfd5d5c438d1c286a5dcff846c to < 1f53d5fc06bd34f1debc5bc31337a267e76c8a5e (affected · git)ea4151222a93d3bfd5d5c438d1c286a5dcff846c to < e8592dec2e935befe842f90f4044d210f59c4d30 (affected · git)Default: unaffected Linux · cna
Linux Linux 7.1 (affected)0 to < 7.1 (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
a5d20c6677ab6624ad2a92b1077103be71e756c7ed78639b4b67d96508b2f09b
Ingested
01 Dec 2026, 05:47:22 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected