medium · CVSS v3 5.5
CVE-2026-98688
A race condition in the Linux kernel Thunderbolt driver can cause a NULL dereference during device removal, potentially leading to a crash.
Overview
A race condition in the Linux kernel Thunderbolt driver can cause a NULL dereference during device removal, potentially leading to a crash. The flaw occurs when tb_remove_work and tb_domain_remove are called concurrently, leaving tb->root_switch unset. It matters because it can disrupt Thunderbolt functionality and cause denial of service on affected systems.
Description
In the Linux kernel, the following vulnerability has been resolved: thunderbolt: Fix NULL dereference in tb_remove_work() There is a slight race between tb_remove_work() and tb_domain_remove() which leads to dereferencing a NULL tb->root_switch pointer inside tb_free_unplugged_xdomains(): Thread A Thread B tb_remove_work() tb_domain_remove() mutex_lock(&tb->lock) tb_stop() /* doesn't cancel a running callback */ cancel_delayed_work(&tcm->remove_work) ... tb_switch_remove(tb->root_switch) tb->root_switch = NULL mutex_unlock(&tb->lock) mutex_lock(&tb->lock) ... /* without checking ->root_switch */ tb_free_unplugged_xdomains(tb->root_switch) mutex_unlock(&tb->lock) Commit a8937f35cf39 ("thunderbolt: Remove XDomain from the bus without holding tb->lock") doesn't seem right to move tb_free_unplugged_xdomains() out of the &tb->lock section and the check for tb->root_switch, in particular. It states: For this reason separate removing the XDomain from the topology data structures (where we need the lock) from unregistering the device from the bus (where remove callbacks of the drivers are being called). tb_free_unplugged_xdomains() belongs to the former group of functions requiring the lock. And it also calls tb_xdomain_remove() which should only be called with &tb->lock held. Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool.
Impact
The vulnerability can lead to a denial of service by crashing the kernel, impacting availability. It may also allow local privilege escalation if an attacker can trigger the race. System administrators and users of Thunderbolt-enabled devices are affected.
Remediation
Apply the kernel patch that synchronizes tb_remove_work and tb_domain_remove, ensuring tb->root_switch is checked before use. Update to the latest stable kernel release that includes the fix. If Thunderbolt is not required, disable the Thunderbolt driver in the kernel configuration or via modprobe -r.
Risk context
Medium severity with a CVSS score of 5.5. No EPSS data available. The risk is moderate; patching mitigates the issue.
Affected products
- Linux kernel
Scores
- Severity
- medium
- CVSS v2
- 4.7
- CVSS v3
- 5.5
- CVSS v4
- —
- EPSS
- —