{"id":"CVE-2026-139231","summary":"smb: smbdirect: don't WARN on an unexpected receive opcode","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: smbdirect: don't WARN on an unexpected receive opcode\n\nThe receive completion handlers smbdirect_connection_recv_io_done(),\nsmbdirect_accept_negotiate_recv_done() and\nsmbdirect_connect_negotiate_recv_done() verify that the completion is a\nregular receive with WARN_ON_ONCE(wc-\u003eopcode != IB_WC_RECV).\n\nBut wc-\u003eopcode is controlled by the remote peer: a posted receive work\nrequest is consumed not only by an incoming SEND, but also by an RDMA\nWrite with Immediate, which completes as IB_WC_RECV_RDMA_WITH_IMM. An\nunauthenticated peer can transmit such a message, even before the\nnegotiate completes, so it reaches the accept/connect negotiate\nhandlers as well. With panic_on_warn set this is a remote denial of\nservice, and otherwise it still taints the kernel and spams the log for\nsomething a peer can trigger at will.\n\nThe opcode check itself was inherited from the original client and\nserver recv_done() handlers (fs/smb/client/smbdirect.c and\nfs/smb/server/transport_rdma.c), where an unexpected opcode was simply\nlogged and the connection was torn down. Only the WARN_ON_ONCE() was\nadded on top during the socketization rework. Drop the WARN_ON_ONCE()\nand keep the existing graceful error path, which logs the unexpected\nopcode (unless the status is IB_WC_WR_FLUSH_ERR) and tears the\nconnection down.","modified":"2026-11-30T15:02:27.769371772Z","published":"2026-11-30T13:32:50.129Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139231.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1f53d5fc06bd34f1debc5bc31337a267e76c8a5e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e8592dec2e935befe842f90f4044d210f59c4d30"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139231.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139231"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ea4151222a93d3bfd5d5c438d1c286a5dcff846c"},{"fixed":"1f53d5fc06bd34f1debc5bc31337a267e76c8a5e"},{"fixed":"e8592dec2e935befe842f90f4044d210f59c4d30"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139231.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.1.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139231.json"}}],"schema_version":"1.9.2"}