{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139359","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.929Z","datePublished":"2026-11-30T13:34:01.864Z","dateUpdated":"2026-12-01T05:42:32.234Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:42:32.234Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: refuse to destroy a QP with type 2 MWs still bound\n\nBinding a type 2 memory window takes a reference on the QP:\nrxe_do_bind_mw() does rxe_get(qp) and stores it in mw->qp. That\nreference is released only when the window is invalidated\n(rxe_do_invalidate_mw() on IB_WR_LOCAL_INV) or the window itself is\ndestroyed (rxe_mw_cleanup()).\n\nrxe_qp_chk_destroy() does not account for those references -- it only\nrefuses when qp->mcg_num is non-zero. So an unprivileged user can bind\na type 2 MW to a QP and then destroy the QP while the binding is still\nlive. __rxe_cleanup() cannot drop the QP refcount to zero (the MW still\nholds a reference), hits its -ETIMEDOUT path, and frees the QP anyway;\nmw->qp is left dangling. When the MW is later invalidated or\ndeallocated, rxe_mw_cleanup()/rxe_do_invalidate_mw() do rxe_put(mw->qp)\non the freed struct rxe_qp -- a use-after-free write (refcount_dec, and\ncomplete()/list work if it reaches zero) reachable from userspace.\nIB_WR_BIND_MW is a local operation, so no peer is required.\n\nTrack the number of type 2 MWs bound to a QP and refuse to destroy the\nQP while that count is non-zero, returning -EBUSY exactly as the\nexisting multicast-attachment check does. The window must be\ninvalidated or deallocated, which drops the reference and the count,\nbefore the QP can be destroyed."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Every step is a uverbs call on /dev/infiniband/uverbsN (mode 0666 via uverbs_devnode): ibv_alloc_mw (type 2), ibv_reg_mr with MW_BIND, an IB_WR_BIND_MW posted on the user's own UC/RC QP, then ibv_destroy_qp. IB_WR_BIND_MW is a local operation that no remote packet supplies, so the vector is local.\nAC:L - No race is involved. rxe_qp_chk_destroy() only checks mcg_num, so destroy goes ahead. __rxe_cleanup() times out after a fixed 50 s, rxe_destroy_qp() still returns 0, and ib_destroy_qp_user() calls kfree(qp). The attacker then calls ibv_dealloc_mw or posts LOCAL_INV whenever they choose. The only precondition is an admin-created rxe link, the equivalent of the hardware being present.\nPR:L - ib_uverbs open, alloc_mw, reg_mr (only needs RLIMIT_MEMLOCK), modify_qp to RTS over loopback to the device's own GID, and post_send all run with no capability check. Any local user can do this once an rxe device exists; creating the device itself needs root (RDMA_NL_ADMIN_PERM).\nUI:N - The attacker creates, binds, destroys and deallocates their own verbs objects. No other user or administrator has to take any action during the attack.\nS:U - The corruption is in kernel heap memory (the freed struct rxe_qp) within the same kernel security authority. No VM, IOMMU or sandbox boundary is crossed.\nC:H - A dangling mw->qp points to a kfree'd rxe_qp that the attacker can reallocate by spraying. The later rxe_put() runs refcount and complete() logic on that controlled memory, a use-after-free usable for privilege escalation and kernel memory disclosure.\nI:H - rxe_mw_cleanup() or rxe_do_invalidate_mw() does kref_put on the freed QP's elem.ref_cnt, a UAF write. If the count reaches zero, complete() on qp->elem.complete runs a swait list_del_init and wake_up_process on attacker-sprayed pointers, giving a kernel write primitive.\nA:H - The refcount decrement and complete() on freed slab memory corrupt the heap and can oops. The WARN_ON in __rxe_cleanup's timeout path panics the machine outright on panic_on_warn systems."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rxe/rxe_mw.c","drivers/infiniband/sw/rxe/rxe_qp.c","drivers/infiniband/sw/rxe/rxe_verbs.h"],"versions":[{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"695ec92952acc5dbe711f82e13ac24c2f1d808db","status":"affected","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"267e168ef9b4f9d7e4f172432567b1b754b477e2","status":"affected","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"bc9f872d3285c240a4dc18d214d896418356812c","status":"affected","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","status":"affected","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","status":"affected","versionType":"git"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"9e61a2ac6590e9c42d2eeef687749781334b300f","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/infiniband/sw/rxe/rxe_mw.c","drivers/infiniband/sw/rxe/rxe_qp.c","drivers/infiniband/sw/rxe/rxe_verbs.h"],"versions":[{"version":"4.8","status":"affected"},{"version":"0","lessThan":"4.8","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":"4.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/695ec92952acc5dbe711f82e13ac24c2f1d808db"},{"url":"https://git.kernel.org/stable/c/267e168ef9b4f9d7e4f172432567b1b754b477e2"},{"url":"https://git.kernel.org/stable/c/bc9f872d3285c240a4dc18d214d896418356812c"},{"url":"https://git.kernel.org/stable/c/3990e21523c0f203bc6d5d9fcf1ad1f3d11857da"},{"url":"https://git.kernel.org/stable/c/d6b13ad770812c1fe553a0c4f7b002cee87ba5ba"},{"url":"https://git.kernel.org/stable/c/9e61a2ac6590e9c42d2eeef687749781334b300f"}],"title":"RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound","x_generator":{"engine":"bippy-1.2.0"}}}}