Skip to contentSkip to conversation

CVE-2026-89464: power: supply: twl4030_charger: cancel workers via devm

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 11

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

power: supply: twl4030_charger: cancel workers via devm

bci is devm-allocated. Two workers (bci->work and bci->current_worker) dereference it. twl4030_bci_remove() disables charging and masks interrupts. It cancels neither worker. A worker pending at remove() can run after devm frees bci.

The USB transceiver comes from devm_usb_get_phy_by_node(). devm unregisters its notifier only after remove() returns. A cancel_work_sync() in remove() can then race a notifier reschedule. devm_work_autocancel() and devm_delayed_work_autocancel() avoid that. They cancel the workers during devm release, before bci is freed.

The current_worker is registered first, since devm will cancel in reverse order and bci->work can reschedule current_worker.

[Move comment about order into the commit message]

The Linux kernel CVE team has assigned CVE-2026-89464 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.39 with commit d6ccc442b12102414c1343f0adacaa8a1aaa516c and fixed in 6.12.109 with commit 72a2d6cd049f892853e4e2d8d8fc5e7d0244a458
	Issue introduced in 2.6.39 with commit d6ccc442b12102414c1343f0adacaa8a1aaa516c and fixed in 6.18.50 with commit a4460e89d4088cfec2da5be33e265ef1a8e780e9
	Issue introduced in 2.6.39 with commit d6ccc442b12102414c1343f0adacaa8a1aaa516c and fixed in 7.2.4 with commit b955da82db4170bdf1c784dc457287aa0c977378
	Issue introduced in 2.6.39 with commit d6ccc442b12102414c1343f0adacaa8a1aaa516c and fixed in 7.3-rc1 with commit 6eba34732524067da2aad5ddfdfbc641ded10e9e

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89464

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/power/supply/twl4030_charger.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/72a2d6cd049f892853e4e2d8d8fc5e7d0244a458
	https://git.kernel.org/stable/c/a4460e89d4088cfec2da5be33e265ef1a8e780e9
	https://git.kernel.org/stable/c/b955da82db4170bdf1c784dc457287aa0c977378
	https://git.kernel.org/stable/c/6eba34732524067da2aad5ddfdfbc641ded10e9e