{"id":"CVE-2026-139359","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:19:02.140","lastModified":"2026-12-01T06:17:43.930","vulnStatus":"Received","cveTags":[],"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."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/infiniband/sw/rxe/rxe_mw.c","drivers/infiniband/sw/rxe/rxe_qp.c","drivers/infiniband/sw/rxe/rxe_verbs.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"695ec92952acc5dbe711f82e13ac24c2f1d808db","versionType":"git","status":"affected"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"267e168ef9b4f9d7e4f172432567b1b754b477e2","versionType":"git","status":"affected"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"bc9f872d3285c240a4dc18d214d896418356812c","versionType":"git","status":"affected"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","versionType":"git","status":"affected"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","versionType":"git","status":"affected"},{"version":"8700e3e7c4857d28ebaa824509934556da0b3e76","lessThan":"9e61a2ac6590e9c42d2eeef687749781334b300f","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/infiniband/sw/rxe/rxe_mw.c","drivers/infiniband/sw/rxe/rxe_qp.c","drivers/infiniband/sw/rxe/rxe_verbs.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"4.8","status":"affected"},{"version":"0","lessThan":"4.8","versionType":"semver","status":"unaffected"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"references":[{"url":"https://git.kernel.org/stable/c/267e168ef9b4f9d7e4f172432567b1b754b477e2","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/695ec92952acc5dbe711f82e13ac24c2f1d808db","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/9e61a2ac6590e9c42d2eeef687749781334b300f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/bc9f872d3285c240a4dc18d214d896418356812c","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}