{"id":"CVE-2026-139231","state":"PUBLISHED","title":"smb: smbdirect: don't WARN on an unexpected receive opcode","description":"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->opcode != IB_WC_RECV).\n\nBut wc->opcode 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.","publishedAt":"2026-11-30T13:32:50.129Z","updatedAt":"2026-11-30T13:32:50.129Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ea4151222a93d3bfd5d5c438d1c286a5dcff846c","status":"affected","lessThan":"1f53d5fc06bd34f1debc5bc31337a267e76c8a5e","versionType":"git"},{"version":"ea4151222a93d3bfd5d5c438d1c286a5dcff846c","status":"affected","lessThan":"e8592dec2e935befe842f90f4044d210f59c4d30","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/accept.c","fs/smb/smbdirect/connect.c","fs/smb/smbdirect/connection.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/accept.c","fs/smb/smbdirect/connect.c","fs/smb/smbdirect/connection.c"]}],"references":["https://git.kernel.org/stable/c/1f53d5fc06bd34f1debc5bc31337a267e76c8a5e","https://git.kernel.org/stable/c/e8592dec2e935befe842f90f4044d210f59c4d30"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139231.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139231","state":"PUBLISHED","datePublished":"2026-11-30T13:32:50.129Z","dateUpdated":"2026-11-30T13:32:50.129Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.921Z"},"containers":{"cna":{"title":"smb: smbdirect: don't WARN on an unexpected receive opcode","descriptions":[{"lang":"en","value":"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->opcode != IB_WC_RECV).\n\nBut wc->opcode 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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ea4151222a93d3bfd5d5c438d1c286a5dcff846c","status":"affected","lessThan":"1f53d5fc06bd34f1debc5bc31337a267e76c8a5e","versionType":"git"},{"version":"ea4151222a93d3bfd5d5c438d1c286a5dcff846c","status":"affected","lessThan":"e8592dec2e935befe842f90f4044d210f59c4d30","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/accept.c","fs/smb/smbdirect/connect.c","fs/smb/smbdirect/connection.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/smbdirect/accept.c","fs/smb/smbdirect/connect.c","fs/smb/smbdirect/connection.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1f53d5fc06bd34f1debc5bc31337a267e76c8a5e"},{"url":"https://git.kernel.org/stable/c/e8592dec2e935befe842f90f4044d210f59c4d30"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:50.129Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}