net: sungem: fix probe error cleanup
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: net: sungem: fix probe error cleanup gem_init_one() calls gem_remove_one() when register_netdev() fails. gem_remove_one() unregisters and frees resources owned by the net_device, including the DMA block, MMIO mapping, PCI regions, and the net_device itself. gem_init_one() then falls through to its own cleanup labels and frees the same resources again. Keep the register_netdev() error path in gem_init_one(): clear drvdata so PM/remove paths do not see a half-registered device, remove the NAPI instance added during probe, and let the existing cleanup labels release the resources once. The issue was found by a local static-analysis checker for probe error paths. The reported path was manually inspected before sending this fix. Compile-tested with CONFIG_SUNGEM=y. Runtime testing was not performed because no sungem hardware is available.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in f3bd60b26814b7c3c57c629abb0857dfc76d214a; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in f1d04fefb0c2a2de32d9cee22cdc2088be3758d1; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 331c99029a1cee1111f82f63d15b3cdebefbd341; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in a63eaf7605d1579cf3f551792e478cfaf5ac37d1; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in fb73cdc50b6755e5c3a80a195b2708a39ada0230; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in b15a3cc68e2450aa0edd94a74a7bdd45fcc17dd9; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in bc49e8746584564dba47d963d1916cc876fc6f6b; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 36dea2f639249460d13f6ca66b2a9064187cd34d
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 5.10.261; From 5.11.0 · fixed in 5.15.212; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5
References 8
git.kernel.org
- stable/c/f3bd60b26814b7c3c57c629abb0857dfc76d214a
- stable/c/f1d04fefb0c2a2de32d9cee22cdc2088be3758d1
- stable/c/331c99029a1cee1111f82f63d15b3cdebefbd341
- stable/c/a63eaf7605d1579cf3f551792e478cfaf5ac37d1
- stable/c/fb73cdc50b6755e5c3a80a195b2708a39ada0230
- stable/c/b15a3cc68e2450aa0edd94a74a7bdd45fcc17dd9
- stable/c/bc49e8746584564dba47d963d1916cc876fc6f6b
- stable/c/36dea2f639249460d13f6ca66b2a9064187cd34d