CVE-2026-139358: RDMA/rxe: reject IB_WR_REG_MR from user QPs in rxe_reg_fast_mr()
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: reject IBWRREGMR from user QPs in rxeregfastmr()
IBWRREGMR is documented as kernel-only ("can not be issued by userspace"), but nothing enforces it. rxewropcodeinfo[IBWRREGMR] sets WRLOCALOPMASK for IBQPTRC, a QP type userspace can create, so a user QP that writes opcode = IBWRREGMR into its mmap'd SQ ring reaches rxedolocalops() -> rxeregfastmr(). That function then trusts the ring-supplied fields:
struct rxemr mr = tormr(wqe->wr.wr.reg.mr); ... if (unlikely(mr->state != RXEMRSTATEFREE)) / deref / ... mr->access = access; / write /
For a user QP wqe->wr.wr.reg.mr is a fully attacker-chosen pointer, so this is an arbitrary-kernel-address dereference (arbitrary read confirmed, oops). No existing check distinguishes a user QP on this path.
Reject IBWRREGMR for user QPs before dereferencing the supplied pointer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In rxe_reg_fast_mr(), reject IB_WR_REG_MR from user QPs before dereferencing the supplied mr pointer.