RDMA/rxe: Fix UAF in ODP init error-handling path
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 4cfb448705da3171d44d9cbe7be53ff03284d532, Kernel 51f2c8d2c99fc1f452f7113c08a35edcc4bf8732, Kernel 5f1933163327c9f1c8f2a341c6cb551aaf231ff9 and 2 more.
In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Fix UAF in ODP init error-handling path 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. Fix the UAF by clearing mr->umem after releasing the failed ODP umem so the MR cleanup path does not release it again.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =6.15, >=d03fb5c6599e31b90c6b5f65d43d6ccc6b49eb91 <4cfb448705da3171d44d9cbe7be53ff03284d532, >=d03fb5c6599e31b90c6b5f65d43d6ccc6b49eb91 <51f2c8d2c99fc1f452f7113c08a35edcc4bf8732, >=d03fb5c6599e31b90c6b5f65d43d6ccc6b49eb91 <5f1933163327c9f1c8f2a341c6cb551aaf231ff9 | 4cfb448705da3171d44d9cbe7be53ff03284d532, 51f2c8d2c99fc1f452f7113c08a35edcc4bf8732, 5f1933163327c9f1c8f2a341c6cb551aaf231ff9 |
| linux-kernel: Kernel | >=6.15.0 <6.18.52, >=6.19.0 <7.2.6 | 6.18.52, 7.2.6 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket