CVE-2026-89463: power: supply: ucs1002: fix use-after-free on remove
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 healthpoll 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 healthpoll with devmdelayedworkautocancel() 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.
Event History
Frequently Asked Questions
When can the use-after-free occur?
It can occur during driver unbind or device removal after the alert IRQ handler has queued the health_poll delayed work. The risk persists when the chip reports a bad-health condition because the delayed work reschedules itself.
What component must be present for a system to be affected?
The affected component is the Linux kernel ucs1002 power-supply driver. The vulnerable path requires its alert IRQ and health_poll delayed-work handling during removal.
What change resolves the issue?
The fix registers health_poll with devm_delayed_work_autocancel() before requesting the alert IRQ. This prevents the IRQ handler from queuing work during teardown and cancels pending work before the driver data is freed.