Skip to contentSkip to conversation

CVE-2026-98693: thunderbolt: Hold a router reference for each allocated HopID

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

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

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

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

thunderbolt: Hold a router reference for each allocated HopID

tb_stop() drops the reference to all DP tunnels but does not deactivate them, thus nothing cancels a dprx_work still in flight (which holds its own tunnel reference) and the tunnel can outlive tb_switch_remove(). The HopID releases in tb_path_free() then operate on freed IDAs and trigger warnings like

ida_free called for id=8 which is not allocated.

This can be triggered by unbinding the driver while a DP tunnel is still waiting for the DPRX capabilities read to finish. On the Apple NHI unplugging the cable runs into just that reliably because the read can never finish right now and because the unplug powers down the entire USB4 complex and removes the NHI device.

Take a router reference whenever an input or output HopID is allocated and drop it again after the HopID is released. This keeps the ports and their HopID IDAs alive for as long as they are used.

The KUnit tests allocate routers without ever registering their devices so initialize the embedded struct device there as well and drop its initial reference when the test is finished.

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

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

	Issue introduced in 6.14 with commit d6d458d42e1e1544a18f37f1d5c840e00d5261b9 and fixed in 6.18.56 with commit c444d2c17dc236680324fd989232199680a6c419
	Issue introduced in 6.14 with commit d6d458d42e1e1544a18f37f1d5c840e00d5261b9 and fixed in 7.2.10 with commit 2b5f976119d8f099a03cbf700df3d9c8690fe33d
	Issue introduced in 6.14 with commit d6d458d42e1e1544a18f37f1d5c840e00d5261b9 and fixed in 7.3-rc6 with commit 032c59c7681c661b63123231824170c025afb7e7

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-98693

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/thunderbolt/switch.c
drivers/thunderbolt/test.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/c444d2c17dc236680324fd989232199680a6c419
	https://git.kernel.org/stable/c/2b5f976119d8f099a03cbf700df3d9c8690fe33d
	https://git.kernel.org/stable/c/032c59c7681c661b63123231824170c025afb7e7