{"id":"CVE-2026-139359","aliases":["CVE-2026-139359"],"related":[],"kind":"vulnerability","state":"published","title":"RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:34:01.864Z","modified":"2026-12-01T06:17:43.930Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"695ec92952acc5dbe711f82e13ac24c2f1d808db","status":"affected"},{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"267e168ef9b4f9d7e4f172432567b1b754b477e2","status":"affected"},{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"bc9f872d3285c240a4dc18d214d896418356812c","status":"affected"},{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","status":"affected"},{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","status":"affected"},{"type":"git","introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76","fixed":"9e61a2ac6590e9c42d2eeef687749781334b300f","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.8","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/695ec92952acc5dbe711f82e13ac24c2f1d808db","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/267e168ef9b4f9d7e4f172432567b1b754b477e2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bc9f872d3285c240a4dc18d214d896418356812c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e61a2ac6590e9c42d2eeef687749781334b300f","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139359","url":"https://www.cve.org/CVERecord?id=CVE-2026-139359","licence":"CVE Terms of Use","modified":"2026-12-01T05:42:32.234Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139359","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139359","licence":"Public domain","modified":"2026-12-01T06:17:43.930Z"}],"updatedAt":"2026-12-01T06:32:17.206Z","epss":{"score":0.00182,"percentile":0.08147,"date":"2026-12-01T12:00:22.000Z"}}