{"id":"CVE-2025-37788","state":"PUBLISHED","title":"cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path\n\nIn the for loop used to allocate the loc_array and bmap for each port, a\nmemory leak is possible when the allocation for loc_array succeeds,\nbut the allocation for bmap fails. This is because when the control flow\ngoes to the label free_eth_finfo, only the allocations starting from\n(i-1)th iteration are freed.\n\nFix that by freeing the loc_array in the bmap allocation error path.","publishedAt":"2025-05-01T13:07:22.208Z","updatedAt":"2026-05-11T21:15:11.337Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"e9de08e15aee35b96064960f95997bb6c1209c4b","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"118d05b530343cd9322607b9719405ba254a4183","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"fa2d7708955e4f8212fd69bab1da604e60cb0b15","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"08aa59c0be768596467552c129e9f82166779a67","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"dafb6e433ab2333b67be05433dc9c6ccbc7b1284","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"76deedea08899885f076aba0bb80bd1276446822","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"00ffb3724ce743578163f5ade2884374554ca021","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"5.10.237","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c"]}],"references":["https://git.kernel.org/stable/c/e9de08e15aee35b96064960f95997bb6c1209c4b","https://git.kernel.org/stable/c/118d05b530343cd9322607b9719405ba254a4183","https://git.kernel.org/stable/c/fa2d7708955e4f8212fd69bab1da604e60cb0b15","https://git.kernel.org/stable/c/08aa59c0be768596467552c129e9f82166779a67","https://git.kernel.org/stable/c/dafb6e433ab2333b67be05433dc9c6ccbc7b1284","https://git.kernel.org/stable/c/76deedea08899885f076aba0bb80bd1276446822","https://git.kernel.org/stable/c/00ffb3724ce743578163f5ade2884374554ca021","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37788.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37788","state":"PUBLISHED","datePublished":"2025-05-01T13:07:22.208Z","dateUpdated":"2026-05-11T21:15:11.337Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.940Z"},"containers":{"cna":{"title":"cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path\n\nIn the for loop used to allocate the loc_array and bmap for each port, a\nmemory leak is possible when the allocation for loc_array succeeds,\nbut the allocation for bmap fails. This is because when the control flow\ngoes to the label free_eth_finfo, only the allocations starting from\n(i-1)th iteration are freed.\n\nFix that by freeing the loc_array in the bmap allocation error path."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"e9de08e15aee35b96064960f95997bb6c1209c4b","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"118d05b530343cd9322607b9719405ba254a4183","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"fa2d7708955e4f8212fd69bab1da604e60cb0b15","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"08aa59c0be768596467552c129e9f82166779a67","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"dafb6e433ab2333b67be05433dc9c6ccbc7b1284","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"76deedea08899885f076aba0bb80bd1276446822","versionType":"git"},{"version":"d915c299f1da68a7dbb43895b8741c7b916c9d08","status":"affected","lessThan":"00ffb3724ce743578163f5ade2884374554ca021","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","versionType":"semver"},{"version":"5.10.237","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.135","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.88","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.25","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.4","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e9de08e15aee35b96064960f95997bb6c1209c4b"},{"url":"https://git.kernel.org/stable/c/118d05b530343cd9322607b9719405ba254a4183"},{"url":"https://git.kernel.org/stable/c/fa2d7708955e4f8212fd69bab1da604e60cb0b15"},{"url":"https://git.kernel.org/stable/c/08aa59c0be768596467552c129e9f82166779a67"},{"url":"https://git.kernel.org/stable/c/dafb6e433ab2333b67be05433dc9c6ccbc7b1284"},{"url":"https://git.kernel.org/stable/c/76deedea08899885f076aba0bb80bd1276446822"},{"url":"https://git.kernel.org/stable/c/00ffb3724ce743578163f5ade2884374554ca021"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:15:11.337Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"5.10.237"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"5.15.181"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.1.135"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.6.88"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.12.25"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.14.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:55:12.029Z"}}]}}}