# CVE-2026-139359: RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound


- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 1 Dec 2026
- **Also known as:** BELL-CVE-2026-139359, DEBIAN-CVE-2026-139359, GHSA-q838-64c5-x3gf, UBUNTU-CVE-2026-139359

## What is CVE-2026-139359?

CVE-2026-139359 is a high-severity vulnerability in Linux, published on 30 Nov 2026. 

### Official description

In the Linux kernel, the following vulnerability has been resolved:

RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound

Binding a type 2 memory window takes a reference on the QP:
rxe_do_bind_mw() does rxe_get(qp) and stores it in mw->qp. That
reference is released only when the window is invalidated
(rxe_do_invalidate_mw() on IB_WR_LOCAL_INV) or the window itself is
destroyed (rxe_mw_cleanup()).

rxe_qp_chk_destroy() does not account for those references -- it only
refuses when qp->mcg_num is non-zero. So an unprivileged user can bind
a type 2 MW to a QP and then destroy the QP while the binding is still
live. __rxe_cleanup() cannot drop the QP refcount to zero (the MW still
holds a reference), hits its -ETIMEDOUT path, and frees the QP anyway;
mw->qp is left dangling. When the MW is later invalidated or
deallocated, rxe_mw_cleanup()/rxe_do_invalidate_mw() do rxe_put(mw->qp)
on the freed struct rxe_qp -- a use-after-free write (refcount_dec, and
complete()/list work if it reaches zero) reachable from userspace.
IB_WR_BIND_MW is a local operation, so no peer is required.

Track the number of type 2 MWs bound to a QP and refuse to destroy the
QP while that count is non-zero, returning -EBUSY exactly as the
existing multicast-attachment check does. The window must be
invalidated or deallocated, which drops the reference and the count,
before the QP can be destroyed.

## Which versions are affected by CVE-2026-139359?


## How do I fix CVE-2026-139359?

Upgrade to a fixed version.

## Is CVE-2026-139359 being exploited?

There is no known exploitation of CVE-2026-139359 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-139359 and fix it if it is affected.

What it is: CVE-2026-139359 is a high-severity vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139359 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-139359/ (Markdown: https://insights.sbomify.com/CVE-2026-139359/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-139359
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-139359
- OSV: https://osv.dev/vulnerability/CVE-2026-139359

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-139359/
Summaries are generated and may contain mistakes; the official description above is the record.
