Look up another CVE · open CVE-2026-98366 in the interactive tracker
CVE-2026-98366
RDMA/rxe: validate access flags before swapping the MR's PD
Published 2026-10-06 (13 days ago) by the Linux kernel CNA. Subsystem drivers/infiniband. Debian urgency: unimportant.
What to do, per Debian release
Debian's own status for CVE-2026-98366 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | not affected | 6.1.190-1 | Nothing to do. bookworm never shipped the vulnerable code. |
| Debian 13trixie | fixedDSA-6568-1 · 2026-10-16 · text | 6.12.113-1 | Update the kernel and reboot. DSA-6568-1 shipped the fix on 2026-10-16, in 6.12.113-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 7.2.8-1 | Update the kernel and reboot. Fixed in 7.2.8-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 7.2.8-1 | Update the kernel and reboot. Fixed in 7.2.8-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
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.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/infiniband/sw/rxe/rxe_verbs.c
- What this is
- SOFT-ROCE DRIVER (rxe)MAINTAINERS section matched on drivers/infiniband/sw/rxe/ · linux-rdma@vger.kernel.org · Supported
- Kernel module
- rdma_rxe
Check it on the machine
grep -wE 'CONFIG_INFINIBAND|CONFIG_RDMA_RXE' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w rdma_rxePrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, i386/686, i386/686-pae, i386/rt/686-pae
- trixieMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp
- forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armhf/armmp, armhf/armmp-lpae
- M
- a module where it is built at all; some flavours do not build it
- Build switches
- CONFIG_INFINIBAND, CONFIG_RDMA_RXE
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2026-10-06 (13 days ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.12%, higher than 1.5% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- unimportantsource
- Subsystem
- drivers/infiniband
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.5 | 6.6.158 | 08f12745cb72 |
| 6.5 | 6.12.112 | 7230cc456d4b |
| 6.5 | 6.18.54 | fe602c91a52e |
| 6.5 | 7.2.8 | 4dd7a53f1c5b |
| 6.5 | 7.3 | ae36a5b609ae |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DSA-6568-1 | 2026-10-16 | trixie 6.12.113-1 | tracker |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The bad access_flags/pd_handle reach rxe_rereg_user_mr() only through a local IB_USER_VERBS_CMD_REREG_MR on /dev/infiniband/uverbsN via ib_uverbs_rereg_mr(); no RoCE packet carries rereg arguments, so a remote peer cannot drive it.
- AC:LAttack complexity, low
- Deterministic: flags IB_MR_REREG_PD|IB_MR_REREG_ACCESS with access=IB_ACCESS_RELAXED_ORDERING passes core ib_check_mr_access() but fails RXE_ACCESS_SUPPORTED_MR after mr->ibmr.pd was swapped; the attacker then deregs the MR and deallocs the PD its own MW still uses. No race.
- PR:LPrivileges required, low
- uverbs_devnode() creates /dev/infiniband/uverbsN mode 0666 and there is no capability check from ib_uverbs_rereg_mr() to rxe_rereg_user_mr(); any unprivileged local user owning a PD/MR/MW triggers it. Only the one-time admin rxe link creation (RDMA_NL_ADMIN_PERM) is needed.
- UI:NUser interaction, none
- The attacker's own process issues alloc_pd, reg_mr, alloc_mw, the failing rereg_mr, dereg_mr and dealloc_pd; no other user or administrator action is involved.
- S:UScope, unchanged
- The freed rxe PD and the corrupted refcounts are kernel heap objects within the same kernel security authority; no VM, IOMMU or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- After uverbs_free_pd() frees the PD on usecnt alone, the surviving MW still holds a dangling pointer to it; reclaiming that slab object with sprayed data turns later accesses through the MW into a use-after-free read of attacker-shaped memory.
- I:HIntegrity impact, high
- rxe_mw_cleanup() -> __rxe_put() writes (refcount decrement, KASAN write of size 4) into the freed PD, and the inconsistent mr->pd vs usecnt state can be repeated; a decrement into reallocated slab memory is a usable corruption primitive toward privilege escalation.
- A:HAvailability impact, high
- The use-after-free write in __rxe_put() during rxe_dealloc_mw() corrupts freed slab memory and can oops or panic the kernel, and an unprivileged user can repeat it at will.