cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
In the Linux kernel, the following vulnerability has been resolved: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path.
02 / AFFECTED SOFTWARE
Affected packages
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
In the Linux kernel, the following vulnerability has been resolved: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path.
05 / REFERENCES
Further evidence
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://git.kernel.org/stable/c/00ffb3724ce743578163f5ade2884374554ca021
- https://git.kernel.org/stable/c/08aa59c0be768596467552c129e9f82166779a67
- https://git.kernel.org/stable/c/118d05b530343cd9322607b9719405ba254a4183
- https://git.kernel.org/stable/c/76deedea08899885f076aba0bb80bd1276446822
- https://git.kernel.org/stable/c/dafb6e433ab2333b67be05433dc9c6ccbc7b1284
- https://git.kernel.org/stable/c/e9de08e15aee35b96064960f95997bb6c1209c4b
- https://git.kernel.org/stable/c/fa2d7708955e4f8212fd69bab1da604e60cb0b15
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37788.json
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
- https://nvd.nist.gov/vuln/detail/CVE-2025-37788