CVE-2026-98366
High · 7.8CVSS
7.8
EPSS
0.1%
Published
Oct 6, 2026
CISA due date
—
Cloudanix analysis
A bug in Linux kernel code that handles fast network connections can let a program running on the same machine crash the whole system or gain higher privileges.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw is a use-after-free caused by reassigning mr->ibmr.pd before validating IB_MR_REREG_ACCESS flags in rxe_rereg_user_mr(); on error the core does not undo the reassignment, so ib_dereg_mr_user decrements the wrong PD usecnt, allowing uverbs_free_pd to free a PD that a memory window still references, after which rxe_mw_cleanup writes to the freed object.
Why it matters to the business
RDMA-enabled Linux systems can suffer kernel crashes or local privilege escalation during memory-region reregistration, interrupting high-performance storage, networking, or HPC workloads that rely on the rxe soft-roce driver.
How an attack unfolds
A local attacker allocates a PD and MR, issues an rereg_mr call that requests both PD and invalid ACCESS flags, triggers the early PD swap, forces an error path that leaves reference counts inconsistent, then deallocates the original PD while a memory window still points to it, producing a use-after-free write in rxe_mw_cleanup.
How to fix it
Apply the upstream fix that moves the access-flag validation before any PD or access-state mutation so the callback either succeeds completely or fails without side effects; rebuild and reboot with the patched kernel.
How to confirm the fix worked
Inspect the rxe_rereg_user_mr function to confirm the access check precedes the IB_MR_REREG_PD block, then exercise rereg_mr paths with both valid and invalid flags while monitoring for KASAN or reference-count warnings.
Typical attack path
- Obtain local unprivileged access on a system with the rxe module loaded
- Create a protection domain and memory region via ib_uverbs
- Invoke rereg_mr supplying both IB_MR_REREG_PD and an unsupported ACCESS flag
- Trigger memory-window creation and subsequent deregistration of the original PD
- Force rxe_mw_cleanup to dereference the now-freed PD object
How to detect it
Search kernel logs and crash dumps for KASAN slab-use-after-free reports citing __rxe_put, rxe_mw_cleanup or rxe_dealloc_mw; correlate with audit records of ib_uverbs_rereg_mr or ib_uverbs_dealloc_pd calls from untrusted processes.
What your security team should do
- Prioritize kernel updates containing the validation reordering for all RDMA-capable hosts
- Disable the rxe module via modprobe.blacklist if RDMA is not required
- Add KASAN or lockdep instrumentation to staging or test systems that use rxe
- Review any user-space RDMA applications performing rereg_mr calls for error-handling robustness
The record
In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: validate access flags before swapping the MR's PD rxe_rereg_user_mr() reassigns mr->ibmr.pd first and only then validates the IB_MR_REREG_ACCESS argument: if (flags & IB_MR_REREG_PD) { rxe_put(old_pd); rxe_get(pd); mr->ibmr.pd = ibpd; } if (flags & IB_MR_REREG_ACCESS) { if (access & ~RXE_ACCESS_SUPPORTED_MR) return ERR_PTR(-EOPNOTSUPP); mr->access = access; } Both flags pass the entry check because RXE_MR_REREG_SUPPORTED is IB_MR_REREG_PD | IB_MR_REREG_ACCESS, so a caller can reach the access check with mr->ibmr.pd already reassigned. mr->ibmr.pd is owned by the core, which adjusts pd->usecnt only on the success path: ib_uverbs_rereg_mr() jumps to put_new_uobj on a driver error without undoing the reassignment, so mr->pd == new_pd while the usecnts still charge the MR to orig_pd. ib_dereg_mr_user() then decrements new_pd, whose count can reach zero while a memory window still references it; uverbs_free_pd() frees the PD on that count alone and rxe_mw_cleanup() writes to freed memory: BUG: KASAN: slab-use-after-free in __rxe_put+0x31/0xa0 Write of size 4 at addr ffff8881301dd690 by task rxe_poc/591 __rxe_put+0x31/0xa0 rxe_mw_cleanup+0x42/0x200 __rxe_cleanup+0x115/0x370 rxe_dealloc_mw+0x4c/0x80 Allocated by task 591: ib_uverbs_alloc_pd+0x258/0x540 Freed by task 591: ib_dealloc_pd_user+0x174/0x210 uverbs_free_pd+0x8d/0xc0 ib_uverbs_dealloc_pd+0x18e/0x1d0 Validate the access flags before mutating any state so the callback either applies every requested change or none.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|