CVE-2026-139579: RDMA/rxe: Reject prefetch of a non-ODP MR
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Reject prefetch of a non-ODP MR
rxeibadvisemrprefetch() and rxeibprefetchsglist() look up the MR by lkey and hand it to rxeodpdopagefaultandlock() without checking that it is an ODP MR. That path runs toibumemodp() on mr->umem, and for a non-ODP MR mr->umem is a plain struct ibumem from ibumemget(), so the containerof() in toibumemodp() lands past the end of the object and ibumemodpmapdmaandlock() reads its ibumemodp fields out of bounds.
lookupmr() validates the lkey, PD, access and state but not the MR type, and IBUVERBSADVISEMRADVICEPREFETCH is accepted for any MR.
BUG: KASAN: slab-out-of-bounds in ibumemodpmapdmaandlock+0x884/0x8a0 Read of size 8 at addr ffff88810a3ebcf0 by task advi/921 ibumemodpmapdmaandlock+0x884/0x8a0 rxeibadvisemr+0x543/0xad0 ibuverbshandlerUVERBSMETHODADVISEMR+0x446/0x530 ibuverbscmdverbs+0x2b3c/0x3b20 ibuverbsioctl+0x1e3/0x310 Allocated by task 921: ibumemgetva+0x13e/0xae0 rxemrinituser+0x2ae/0xb00 rxeregusermr+0x337/0x510 The buggy address belongs to the object at ffff88810a3ebc80 which belongs to the cache kmalloc-96 of size 96
Ask lookupmr() for IBACCESSONDEMAND in both the synchronous and the asynchronous prefetch arm. mr->access carries that flag only for an MR registered as ODP, so the existing (access & mr->access) != access test rejects a plain MR and the prefetch fails with -EINVAL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In both the synchronous and asynchronous prefetch paths, have lookup_mr() require IB_ACCESS_ON_DEMAND so prefetch rejects non-ODP MRs.
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The affected path is reached when an RDMA/rxe user issues an IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH request for a non-ODP memory region. The lkey must pass lookup_mr() validation for the memory region's lkey, protection domain, access permissions, and state.
Which systems are exposed?
Exposure is limited to Linux kernel environments using the RDMA/rxe path and allowing the affected user-verbs memory-region prefetch operation. The issue concerns non-ODP memory regions; ODP type validation was missing before entering the ODP page-fault path.
How can an attempted or successful trigger be identified?
A KASAN-enabled kernel may report a slab-out-of-bounds read in ib_umem_odp_map_dma_and_lock(), with a call chain through rxe_ib_advise_mr(), ib_uverbs_handler_UVERBS_METHOD_ADVISE_MR(), and ib_uverbs_ioctl(). The out-of-bounds access occurs because a plain ib_umem for a non-ODP MR is treated as an ib_umem_odp object.