power: supply: rt9455: quiesce delayed work before teardown
- 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.6.157, 6.12.109, 6.18.50, 7.2.4
- 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: rt9455: quiesce delayed work before teardown The threaded IRQ handler can queue pwr_rdy_work, max_charging_time_work and batt_presence_work. pwr_rdy_work and batt_presence_work can also queue max_charging_time_work, while batt_presence_work can requeue itself. rt9455_remove() cancels max_charging_time_work before batt_presence_work. The latter can therefore queue max_charging_time_work after it has already been cancelled: rt9455_remove() workqueue cancel pwr_rdy_work cancel max_charging_time_work batt_presence_work queues max_charging_time_work cancel batt_presence_work return devres frees rt9455_info max_charging_time_work dereferences rt9455_info The IRQ also remains registered until devres cleanup and can queue more work after any of the cancellation calls. If rt9455_hw_init() fails after the IRQ has been requested, probe returns without cancelling work that may already have been queued. A pending callback can then access rt9455_info after it has been freed. Register rt9455_cancel_all_delayed_works() through devm_add_action_or_reset() right after devm_power_supply_register(). devres invokes the action in reverse registration order, after the managed IRQ has been freed and before rt9455_info is released, so the delayed works are drained in both rt9455_remove() and the probe error path. Cancel pwr_rdy_work and batt_presence_work before max_charging_time_work because both can queue the latter. This issue was found by an in-house static analysis tool.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From e86d69dd786e94046b8f5be7df1b9a8226a40b2a · fixed in 442c60c08ec23ac45da0a58877cab05e0a58f4ea; From e86d69dd786e94046b8f5be7df1b9a8226a40b2a · fixed in df67c7a2fff8414aa766b8cd5ffe11ec1ca27d02; From e86d69dd786e94046b8f5be7df1b9a8226a40b2a · fixed in 1b9978433c61a9b46e48832a1ebceee1cf5c9eb4; From e86d69dd786e94046b8f5be7df1b9a8226a40b2a · fixed in 7323e562f6961e4b7bce3225cde4ecbc78260deb; From e86d69dd786e94046b8f5be7df1b9a8226a40b2a · fixed in 3e7a1ebc32fad5a558254a478efd401c17a24381
- Linux Linux
4.2
- KernelLinux
From 4.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4