net/mlx5: free mlx5_st_idx_data on final dealloc
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 |
|
|
6.18.407.1.57.2In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: free mlx5_st_idx_data on final dealloc
Workloads that repeatedly allocate and release mkeys carrying TPH steering-tag hints (e.g. churning RDMA MRs) leak one struct mlx5_st_idx_data per cycle; kmemleak flags it as unreferenced and the kmalloc slab grows over time.
When the last reference to an ST table entry is dropped, mlx5_st_dealloc_index() removed the entry from idx_xa but the backing mlx5_st_idx_data allocation was never freed.
Free idx_data after the xa_erase() so the lifetime of the bookkeeping struct matches the lifetime of the ST entry it tracks.
From the CVE record · Linux
The Linux kernel's net/mlx5 driver fails to free bookkeeping data when the final reference to a steering-tag table entry is dropped. Repeated allocation and release of mkeys with TPH steering-tag hints, such as churn in RDMA memory regions, leaks memory over time. The input does not specify an attacker, access requirements, or user interaction.
Engineers running Linux kernels with net/mlx5 should check their versions; affected versions were not provided.