{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139112","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.914Z","datePublished":"2026-11-30T13:31:41.589Z","dateUpdated":"2026-12-01T05:41:13.786Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:41:13.786Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nrnbd-srv: publish the sess_dev at the end of OPEN\n\nrnbd_sess_dev_alloc() stores the empty sess_dev in the XArray as its\nfirst step. An IO message with the new ID from another connection can\nfind it before bdev_file is set, or hold a reference while a failing\nOPEN frees it after a mere RCU grace period. Both are reachable from any\nhost that can open a device.\n\nReserve the ID with a NULL entry and store the sess_dev once nothing can\nfail anymore. The error path still erases the ID, and no longer needs\nsynchronize_rcu()."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The client's own RNBD_MSG_OPEN and an RNBD_MSG_IO carrying the new device_id arrive via rtrs_srv_rdma_done() -> process_io_req() -> rnbd_srv_rdma_ev() -> process_msg_open()/process_rdma(). rtrs_srv_rdma_init() listens with RDMA_PS_TCP on IN6ADDR_ANY, so RoCEv2/iWARP peers reach it over routable IP.\nAC:L - Each RTRS connection has its own IB_POLL_WORKQUEUE CQ, so an IO on a second connection runs rnbd_get_sess_dev() without srv_sess->lock while OPEN holds it, and xa_alloc() IDs are predictable. The peer forces free_srv_sess_dev itself: \"ram0\" then \"./ram0\" gives -EEXIST up to 5.10.y, and opening a device while its own last mapping closes on another session makes rnbd_srv_create_dev_sysfs() fail. Misses are harmless.\nPR:N - rtrs_rdma_connect() and process_info_req() check only RTRS_MAGIC, the version, cid/con_num and a unique pathname, and process_msg_open() checks only path length and \"..\". No credential is exchanged before a peer opens a device under dev_search_path and sends IO to its ID.\nUI:N - The OPEN, CLOSE and IO messages are handled by the server's CQ workqueue as ordinary RTRS traffic. The attacker supplies every step, and no administrator or local user does anything.\nS:U - The freed rnbd_srv_sess_dev, and the refcount and completion pointer touched through it, belong to the storage server's own kernel. No VM, IOMMU or sandbox boundary is crossed.\nC:H - free_srv_sess_dev waits only an RCU grace period before kfree(), while process_rdma() already holds a kref on the kmalloc-512 sess_dev. When its bio completes, rnbd_dev_bi_end_io() runs kref_put() on the freed slot and, at zero, complete() follows a destroy_comp pointer loaded from whatever reclaimed it, which can be groomed into a kernel read.\nI:H - The stale kref_put() decrements a refcount in reclaimed memory. If the next OPEN's sess_dev reuses the ID and slot, that live mapping is released early, and complete() through a reclaimed pointer writes via its wait-queue lock and done count: heap corruption exploitable for control flow.\nA:H - Without grooming, an IO landing between kref_init() and the bdev_file store in rnbd_srv_create_set_sess_dev() makes process_rdma() call file_bdev(NULL) and oops the CQ worker. On the UAF path, a reused slot oopses in complete(NULL). The unauthenticated peer can repeat both."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/rnbd/rnbd-srv.c"],"versions":[{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"09a61095f582500ccface75a664bae226522ad74","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"273408c3a7a5c16442b0fe902a8e88044a112553","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"310b79760a901d6aff2f968b8de41de29e75d58c","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"ffddd6e86a926a201af6ae903af6847cbe1e8ebd","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"53651d26368168f2b9971cf7136510c9af803777","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"0fcec36fc1a28ebb29a524088e472605ca224840","status":"affected","versionType":"git"},{"version":"2de6c8de192b9341ffa5e84afe1ce6196d4eef41","lessThan":"08ebf69c78a02afb39b7728f3358c09bc4cf067d","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/rnbd/rnbd-srv.c"],"versions":[{"version":"5.8","status":"affected"},{"version":"0","lessThan":"5.8","status":"unaffected","versionType":"semver"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/09a61095f582500ccface75a664bae226522ad74"},{"url":"https://git.kernel.org/stable/c/273408c3a7a5c16442b0fe902a8e88044a112553"},{"url":"https://git.kernel.org/stable/c/310b79760a901d6aff2f968b8de41de29e75d58c"},{"url":"https://git.kernel.org/stable/c/ffddd6e86a926a201af6ae903af6847cbe1e8ebd"},{"url":"https://git.kernel.org/stable/c/53651d26368168f2b9971cf7136510c9af803777"},{"url":"https://git.kernel.org/stable/c/0fcec36fc1a28ebb29a524088e472605ca224840"},{"url":"https://git.kernel.org/stable/c/08ebf69c78a02afb39b7728f3358c09bc4cf067d"}],"title":"rnbd-srv: publish the sess_dev at the end of OPEN","x_generator":{"engine":"bippy-1.2.0"}}}}