Re: [PATCH] RDMA/rxe: Fix UAF in ODP init error-handling path

Leon Romanovsky <[email protected]> Mon, 27 Jul 2026 07:46:06 -0400
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On Mon, 27 Jul 2026 13:06:59 +0800, Peiyang He wrote:
> rxe_odp_mr_init_user() stores &umem_odp->umem in mr->umem before
> calling rxe_odp_init_pages(). If rxe_odp_init_pages() fails,
> rxe_odp_mr_init_user() releases umem_odp and returns an error.
> 
> rxe_reg_user_mr() then unwinds the error through rxe_cleanup(),
> rxe_mr_cleanup(), ib_umem_release(mr->umem). There is an
> IS_ERR_OR_NULL(umem) check at the start of ib_umem_release().
> But since mr->umem is NOT reset to NULL in the error handling
> path of rxe_odp_mr_init_user(), the check passes and it reads
> already-freed fields like umem->is_dmabuf, causing UAF.
> 
> [...]

Applied, thanks!

[1/1] RDMA/rxe: Fix UAF in ODP init error-handling path
      https://git.kernel.org/rdma/rdma/c/d7c244a453561b

Best regards,
-- 
Leon Romanovsky <[email protected]>