{"api_version":"1","generated_at":"2026-12-01T06:50:21+00:00","cve":"CVE-2026-139359","urls":{"html":"https://cve.report/CVE-2026-139359","api":"https://cve.report/api/cve/CVE-2026-139359.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139359","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139359"},"summary":{"title":"RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:02","updated_at":"2026-12-01 06:17:43"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/695ec92952acc5dbe711f82e13ac24c2f1d808db","name":"https://git.kernel.org/stable/c/695ec92952acc5dbe711f82e13ac24c2f1d808db","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","name":"https://git.kernel.org/stable/c/3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/bc9f872d3285c240a4dc18d214d896418356812c","name":"https://git.kernel.org/stable/c/bc9f872d3285c240a4dc18d214d896418356812c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","name":"https://git.kernel.org/stable/c/d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/267e168ef9b4f9d7e4f172432567b1b754b477e2","name":"https://git.kernel.org/stable/c/267e168ef9b4f9d7e4f172432567b1b754b477e2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9e61a2ac6590e9c42d2eeef687749781334b300f","name":"https://git.kernel.org/stable/c/9e61a2ac6590e9c42d2eeef687749781334b300f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139359","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139359","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 695ec92952acc5dbe711f82e13ac24c2f1d808db git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 267e168ef9b4f9d7e4f172432567b1b754b477e2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 bc9f872d3285c240a4dc18d214d896418356812c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 3990e21523c0f203bc6d5d9fcf1ad1f3d11857da git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 d6b13ad770812c1fe553a0c4f7b002cee87ba5ba git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8700e3e7c4857d28ebaa824509934556da0b3e76 9e61a2ac6590e9c42d2eeef687749781334b300f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.8","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.8 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","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","vendor":"Linux","versions":[{"lessThan":"695ec92952acc5dbe711f82e13ac24c2f1d808db","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"},{"lessThan":"267e168ef9b4f9d7e4f172432567b1b754b477e2","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"},{"lessThan":"bc9f872d3285c240a4dc18d214d896418356812c","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"},{"lessThan":"3990e21523c0f203bc6d5d9fcf1ad1f3d11857da","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"},{"lessThan":"d6b13ad770812c1fe553a0c4f7b002cee87ba5ba","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"},{"lessThan":"9e61a2ac6590e9c42d2eeef687749781334b300f","status":"affected","version":"8700e3e7c4857d28ebaa824509934556da0b3e76","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","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","vendor":"Linux","versions":[{"status":"affected","version":"4.8"},{"lessThan":"4.8","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"4.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"4.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"4.8","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.8","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:42:32.234Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139359","datePublished":"2026-11-30T13:34:01.864Z","dateReserved":"2026-11-30T13:22:15.929Z","dateUpdated":"2026-12-01T05:42:32.234Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:02","lastModifiedDate":"2026-12-01 06:17:43","problem_types":[],"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}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139359","Ordinal":"1","Title":"RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound","CVE":"CVE-2026-139359","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139359","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound"}]}}}