CVE-2026-98758: usb: typec: ucsi: glink: fix use-after-free of ucsi on remove
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: glink: fix use-after-free of ucsi on remove
The pmic_glink client is released by the devres cleanup, which runs after pmic_glink_ucsi_remove() has returned, so its notification callbacks can queue work until then. Work that runs after ucsi_unregister() has been called touches freed state: it dereferences the connector array that ucsi_unregister() freed, or registers and unregisters the instance a second time.
Disable both work items with disable_work_sync() before unregistering, and unregister only if the instance is still registered.
This issue was found by an in-house static analysis tool.
The Linux kernel CVE team has assigned CVE-2026-98758 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit 62b5412b1f4afab27d8df90ddcabb8e1e11a00ad and fixed in 6.12.113 with commit 432b58cd959e594909a581b4974396cdbc9d4ca1 Issue introduced in 6.4 with commit 62b5412b1f4afab27d8df90ddcabb8e1e11a00ad and fixed in 6.18.56 with commit 41934f92e7a54d4080ac0b17aacc83224946785c Issue introduced in 6.4 with commit 62b5412b1f4afab27d8df90ddcabb8e1e11a00ad and fixed in 7.2.10 with commit ee8577de01c6b6c7dd1d76b52242c54d37a989f4 Issue introduced in 6.4 with commit 62b5412b1f4afab27d8df90ddcabb8e1e11a00ad and fixed in 7.3-rc6 with commit 63b269ec537dc0fd26d0bd64872c26860d108c9d
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-98758
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/usb/typec/ucsi/ucsi_glink.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/432b58cd959e594909a581b4974396cdbc9d4ca1 https://git.kernel.org/stable/c/41934f92e7a54d4080ac0b17aacc83224946785c https://git.kernel.org/stable/c/ee8577de01c6b6c7dd1d76b52242c54d37a989f4 https://git.kernel.org/stable/c/63b269ec537dc0fd26d0bd64872c26860d108c9d