RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix a race for an ODP MR which leads to CQE with error
This patch addresses a race condition for an ODP MR that can result in a CQE with an error on the UMR QP.
During the __mlx5_ib_dereg_mr() flow, the following sequence of calls occurs:
mlx5_revoke_mr() mlx5r_umr_revoke_mr() mlx5r_umr_post_send_wait()
At this point, the lkey is freed from the hardware's perspective.
However, concurrently, mlx5_ib_invalidate_range() might be triggered by another task attempting to invalidate a range for the same freed lkey.
This task will: - Acquire the umem_odp->umem_mutex lock. - Call mlx5r_umr_update_xlt() on the UMR QP. - Since the lkey has already been freed, this can lead to a CQE error, causing the UMR QP to enter an error state [1].
From the CVE record · Linux
A race in the Linux kernel’s RDMA/mlx5 driver affects on-demand paging memory regions. If one task invalidates a range while another deregisters the same region, an update can use a freed lkey, producing a CQE error and putting the UMR queue pair into an error state. The described trigger involves concurrent local tasks; the input does not establish authentication requirements.
Engineers running Linux kernels with the RDMA/mlx5 driver should check their installations; affected versions are not specified.