power: supply: bq27xxx: Ensure poll work is cancelled on remove
- State
- Published
- Severity
- Not Scored
- Published
- Nov 30, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
power: supply: bq27xxx: Ensure poll work is cancelled on remove
The di->work poll work is queued from the poll callback itself and from bq27xxx_external_power_changed(). The cancel_delayed_work_sync() in bq27xxx_battery_teardown() runs while the power_supply is still registered, so external_power_changed() can re-arm the work after the cancel, and it runs after the driver data has been freed.
Register a devm_delayed_work_autocancel() before devm_power_supply_register(), so on unwind the power_supply is unregistered first, after which no new external_power_changed() callback can be dispatched, and the poll work is cancelled only then. Drop the now-redundant cancel from bq27xxx_battery_teardown().
This issue was found by an in-house static analysis tool.
| Product | Versions |
|---|---|
| Linux Linux | 740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before f70fc2186da6eaf93e22c9eb6d8cb0b14c9bdace Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before f0826debc931fad54f228ed7fc0b0a69a3ac84aa Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before a8a4d1d89dfc925b4437ba66fde9790ab1c4f285 Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before 0187e06729fd3fd1e86ce52f51c512bbd0c39e6c Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before 63181ae0a49b52dfcb30f41bfef45aa004177e39 Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before bc717d870fb6b6e15e386ea80ec9356a15d36792 Affected740b755a3b3433f5ee5f9ef54de5d1b4c08223cc to before db560f4b1c5253853f978385db066220e0c218dc Affected |
| Linux Linux | 2.6.39 Affectedbefore 2.6.39 Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.118 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected |
The record has no CVSS score.
Weaknesses
The record names no weakness.
References
- https://git.kernel.org/stable/c/f70fc2186da6eaf93e22c9eb6d8cb0b14c9bdace
- https://git.kernel.org/stable/c/f0826debc931fad54f228ed7fc0b0a69a3ac84aa
- https://git.kernel.org/stable/c/a8a4d1d89dfc925b4437ba66fde9790ab1c4f285
- https://git.kernel.org/stable/c/0187e06729fd3fd1e86ce52f51c512bbd0c39e6c
- https://git.kernel.org/stable/c/63181ae0a49b52dfcb30f41bfef45aa004177e39
- https://git.kernel.org/stable/c/bc717d870fb6b6e15e386ea80ec9356a15d36792
- https://git.kernel.org/stable/c/db560f4b1c5253853f978385db066220e0c218dc
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.