Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-139359

published high CVSS 3.1 · 7.8

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

Published
30 Nov 2026, 13:34:01 UTC
Updated
01 Dec 2026, 05:42:32 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux8700e3e7c4857d28ebaa824509934556da0b3e76 to < 695ec92952acc5dbe711f82e13ac24c2f1d808db · 8700e3e7c4857d28ebaa824509934556da0b3e76 to < 267e168ef9b4f9d7e4f172432567b1b754b477e2 · 8700e3e7c4857d28ebaa824509934556da0b3e76 to < bc9f872d3285c240a4dc18d214d896418356812c · 8700e3e7c4857d28ebaa824509934556da0b3e76 to < 3990e21523c0f203bc6d5d9fcf1ad1f3d11857da · 8700e3e7c4857d28ebaa824509934556da0b3e76 to < d6b13ad770812c1fe553a0c4f7b002cee87ba5ba · 8700e3e7c4857d28ebaa824509934556da0b3e76 to < 9e61a2ac6590e9c42d2eeef687749781334b300f · Other versions: unaffected Affected Not stated Linux
Linux — Linux4.8 (affected) · 0 to < 4.8 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Pending Fix; Not Affected Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

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.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: 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. AC: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. PR: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). UI: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. S: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. C: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. I: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. A: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.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 8700e3e7c4857d28ebaa824509934556da0b3e76 to < 695ec92952acc5dbe711f82e13ac24c2f1d808db (affected · git)8700e3e7c4857d28ebaa824509934556da0b3e76 to < 267e168ef9b4f9d7e4f172432567b1b754b477e2 (affected · git)8700e3e7c4857d28ebaa824509934556da0b3e76 to < bc9f872d3285c240a4dc18d214d896418356812c (affected · git)8700e3e7c4857d28ebaa824509934556da0b3e76 to < 3990e21523c0f203bc6d5d9fcf1ad1f3d11857da (affected · git)8700e3e7c4857d28ebaa824509934556da0b3e76 to < d6b13ad770812c1fe553a0c4f7b002cee87ba5ba (affected · git)8700e3e7c4857d28ebaa824509934556da0b3e76 to < 9e61a2ac6590e9c42d2eeef687749781334b300f (affected · git)Default: unaffected Linux · cna
Linux Linux 4.8 (affected)0 to < 4.8 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

6

Provider assertions

1

Linux · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
cd03a02014cd6aaa5e939fbf59b232200a43459a740675b496e293726d7dfcd3
Ingested
01 Dec 2026, 05:47:22 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected