CVE-2026-89467: power: supply: qcom_battmgr: fix use-after-free
In the Linux kernel, the following vulnerability has been resolved:
power: supply: qcombattmgr: fix use-after-free
qcombattmgrpdrnotify() queues enablework when the PMIC GLINK service comes up, and the worker recovers battmgr through containerof() to issue firmware requests. The PMIC GLINK client stays on the client list until its devres release action runs, so a PDR notification can keep queueing the work, and a pending or running worker can access battmgr after devres frees it.
Make enablework device-managed with devmworkautocancel(), registered before the PMIC GLINK client is allocated. The devres cleanup then releases the client first, so no further notification can queue the work, and cancels the work before battmgr is freed.
This issue was found by an in-house static analysis tool.
Affected Software
Event History
Frequently Asked Questions
Which systems are potentially affected?
Systems running the Linux kernel Qualcomm battery manager driver (qcom_battmgr) with a PMIC GLINK client are potentially affected. The issue involves notifications from the PMIC GLINK service.
What conditions are required for the use-after-free to occur?
A PMIC GLINK PDR notification must queue or leave pending the enable_work worker while the driver is being released through devres. The worker can then run after the battmgr structure has been freed.
What does the fix do to prevent the issue?
The fix makes enable_work device-managed with devm_work_autocancel() and registers it before allocating the PMIC GLINK client. Cleanup releases the client before cancelling the work, preventing further notifications from queuing it and ensuring the worker is cancelled before battmgr is freed.