power: supply: ab8500_fg: fix use-after-free on remove
- 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 6.12.112, 6.18.51, 7.2.5
- 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
Summary
In the Linux kernel, the following vulnerability has been resolved: power: supply: ab8500_fg: fix use-after-free on remove ab8500_fg_remove() destroys the driver workqueue while the threaded interrupt handlers are still armed; they are devm-managed and freed only after ->remove() returns, so a handler that fires in that window queues work on the freed workqueue. Tear the workqueue down through devm instead, registering its cleanup after the power supply and before the interrupt requests. devm then frees the interrupts first, so the handlers can no longer queue work, before disabling the delayed and plain work items and destroying the workqueue. Disabling the items, rather than cancelling them, keeps them disabled so no producer (including the power-supply external_power_changed callback) can requeue them. Found by an in-house static analysis tool.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 13151631b5bd06a1511353bb221079bbd76606c3 · fixed in c2ce9b8f325f522e10e4d262b37ae49deb83e79b; From 13151631b5bd06a1511353bb221079bbd76606c3 · fixed in c660c017dec1fd7cd88e1103c5ae1aae6ce636bf; From 13151631b5bd06a1511353bb221079bbd76606c3 · fixed in 013731074ab6a8d11ec209eee64c5b2656954479; From 13151631b5bd06a1511353bb221079bbd76606c3 · fixed in 75b1e88d34254f4fb7753345e21bfee47abddd7f
- Linux Linux
3.4
- KernelLinux
From 3.4.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.51; From 6.19.0 · fixed in 7.2.5