RDMA/cxgb4: free STAG index when TPT entry write fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ec3eead217181d7360a11317a888ceb30807867c · < a2e37d1ab773be3cd26b1c19593ca2dbcece9c57| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/cxgb4: free STAG index when TPT entry write fails
write_tpt_entry() allocates a new STAG index with c4iw_get_resource() and bumps stats.stag.cur before programming the entry. When write_adapter_mem() fails, it returns the error without releasing the index or reversing the statistic. No MR is inserted into rhp->mrs, so deregistration never reclaims it, leaking the index until device teardown.
Record whether this call allocated the index and, on a failed write, return it to tpt_table and decrement stats.stag.cur. Key the rollback on both the write error and that flag, not the error alone: a non-reset update carries a caller-owned STAG that this call did not allocate and must not free.
From the CVE record · Linux
In the Linux kernel’s RDMA/cxgb4 component, a failed TPT entry write can leak an allocated STAG index until device teardown. Repeated failures could exhaust available indices; the input does not establish an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with RDMA/cxgb4 should check their kernels; affected versions were not specified.