Description
In the Linux kernel, the following vulnerability has been resolved: power: supply: ucs1002: fix use-after-free on remove ucs1002 has no remove callback, so unbind runs entirely through devm. The alert IRQ handler queues the health_poll delayed work, and the work reschedules itself while the chip reports a bad-health condition. devm frees the alert IRQ, which only synchronizes the handler; it does not cancel the delayed work, which can then run after devm frees the driver data and dereference it. Register health_poll with devm_delayed_work_autocancel() before the alert IRQ is requested. devm then frees the IRQ before cancelling the work, so the handler can no longer queue it and the work is cancelled before the driver data is freed. This issue was found by an in-house static analysis tool.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 00c19f8a9a58a318a76fd6f735a8aab3f8ead393affected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < a9a7bb801c443a4d9fc623c4a47deb53accb70bbaffected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 2ec4d203ecb06d327af67e32097fe8f774838a40affected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 4ca2a4678202f15eb790eb7f1d562061709caea7affected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 39b60d615dfa1725c235351fb12bc72e5f8a8d32affected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 35242c93d35f391afdc84cef6236b8ad57f1df24affected81196e2e57fc5b88f6b8ca98372a3dde047aa49d to < 609af0ceeaefdfa42cd01dd060b20f2e41f9a232affected
Linux Linux
Default version status: affected
5.10affected0 to < 5.10unaffected5.15.221 to ≤ 5.15.*unaffected6.1.188 to ≤ 6.1.*unaffected6.6.157 to ≤ 6.6.*unaffected6.12.109 to ≤ 6.12.*unaffected6.18.50 to ≤ 6.18.*unaffected7.2.4 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/00c19f8a9a58a318a76fd6f735a8aab3f8ead393 ↗
- https://git.kernel.org/stable/c/a9a7bb801c443a4d9fc623c4a47deb53accb70bb ↗
- https://git.kernel.org/stable/c/2ec4d203ecb06d327af67e32097fe8f774838a40 ↗
- https://git.kernel.org/stable/c/4ca2a4678202f15eb790eb7f1d562061709caea7 ↗
- https://git.kernel.org/stable/c/39b60d615dfa1725c235351fb12bc72e5f8a8d32 ↗
- https://git.kernel.org/stable/c/35242c93d35f391afdc84cef6236b8ad57f1df24 ↗
- https://git.kernel.org/stable/c/609af0ceeaefdfa42cd01dd060b20f2e41f9a232 ↗