CVE-2026-90415: RDMA/cxgb4: free STAG index when TPT entry write fails
In the Linux kernel, the following vulnerability has been resolved:
RDMA/cxgb4: free STAG index when TPT entry write fails
writetptentry() allocates a new STAG index with c4iwgetresource() and bumps stats.stag.cur before programming the entry. When writeadaptermem() 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 tpttable 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.
Affected Software
Event History
Frequently Asked Questions
Under what condition does the STAG index leak occur?
The leak occurs when write_tpt_entry() allocates a new STAG index and the subsequent write_adapter_mem() call fails. The index remains allocated until device teardown because no memory region is inserted for normal deregistration to reclaim it.
Are all failed TPT entry writes affected?
No. The rollback applies only when the failing call allocated a new STAG index. A non-reset update may use a caller-owned STAG, which must not be freed by this error path.
What is the operational impact before the fix is applied?
Repeated qualifying write failures can consume STAG indices and increase stats.stag.cur without releasing them. The leaked indices persist until the device is torn down.