RDMA/cxgb4: Free debugfs on registration failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 49ea0c036ede81f126f1a9389d377999fdf5c5a1 · < 046425412529dbfca1433c8bef5641b271b4ab2a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/cxgb4: Free debugfs on registration failure
c4iw_alloc() creates the per-device debugfs tree (dev->debugfs_root via setup_debugfs()), but it is removed only in c4iw_remove(), not in c4iw_dealloc(). When RDMA device registration fails, the registration worker's err_dealloc_ctx path calls c4iw_dealloc() directly, bypassing c4iw_remove(), so the debugfs dentries leak and outlive the freed c4iw_dev.
Move debugfs_remove_recursive() into c4iw_dealloc() so every path that frees ctx->dev also removes its debugfs tree.
From the CVE record · Linux
The Linux kernel's RDMA/cxgb4 driver can leave debugfs entries behind when RDMA device registration fails. Those entries can outlive the freed device structure; the input does not specify an attacker action, access requirement, or user interaction.
Engineers running Linux kernels with the RDMA/cxgb4 driver should check their kernel versions; affected versions are not specified.