thunderbolt: Fix NULL dereference in tb_remove_work()
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.
CVE-2026-98688
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98688
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "a8937f35cf39c39c64325aa84d0463d866850857",
"lessThan": "2f4cd43faa9d6470b30a9fbcbac6584db8108c1f",
"versionType": "git"
},
{
"status": "affected",
"version": "a8937f35cf39c39c64325aa84d0463d866850857",
"lessThan": "4310c6b8e75d6a47f7548e5948fbe6318aa4440a",
"versionType": "git"
},
{
"status": "affected",
"version": "3e9e823810b9a51f0bee9ed6e3d90df70484ff8d",
"versionType": "git"
},
{
"status": "affected",
"version": "9363cd4977260bf7f211feee54f85858bba2320c",
"versionType": "git"
},
{
"status": "affected",
"version": "5.10.266",
"lessThan": "5.11",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.15.217",
"lessThan": "5.16",
"versionType": "semver"
}
],
"programFiles": [
"drivers/thunderbolt/tb.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "7.2"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "7.2",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "7.2.10",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/thunderbolt/tb.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98688
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #38687 · Revision 1
- Added to Heist Feed
- Publisher date