USB: legousbtower: fix use-after-free on disconnect race
In the Linux kernel, the following vulnerability has been resolved: USB: legousbtower: fix use-after-free on disconnect race mutex_unlock() may access the mutex structure after releasing the lock and therefore cannot be used to manage lifetime of objects directly (unlike spinlocks and refcounts). [1][2] Use a kref to release the driver data to avoid use-after-free in mutex_unlock() when release() races with disconnect(). [1] a51749ab34d9 ("locking/mutex: Document that mutex_unlock() is non-atomic") [2] 2b9d9e0a9ba0 ("locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked")
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.261, 5.15.212, 6.1.178, 6.12.96, 6.18.39, 6.6.145, 7.1.4
- CVEs
- CVE-2026-64340
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 13:42 UTC · Revision 1
Source evidence
USB: legousbtower: fix use-after-free on disconnect race
core-osv · Original sourcePublished 25 Jul 2026, 08:50 UTC
In the Linux kernel, the following vulnerability has been resolved: USB: legousbtower: fix use-after-free on disconnect race mutex_unlock() may access the mutex structure after releasing the lock and therefore cannot be used to manage lifetime of objects directly (unlike spinlocks and refcounts). [1][2] Use a kref to release the driver data to avoid use-after-free in mutex_unlock() when release() races with disconnect(). [1] a51749ab34d9 ("locking/mutex: Document that mutex_unlock() is non-atomic") [2] 2b9d9e0a9ba0 ("locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked")
osv:CVE-2026-64340
Kernel
Fixed versions: 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4
Complete source record
{
"id": "db6506b5b6c6e8fe8c68b96c0e36a5fae175ad238d9ad5700528137505691d84",
"url": "https://osv.dev/vulnerability/CVE-2026-64340",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "USB: legousbtower: fix use-after-free on disconnect race",
"summary": "In the Linux kernel, the following vulnerability has been resolved: USB: legousbtower: fix use-after-free on disconnect race mutex_unlock() may access the mutex structure after releasing the lock and therefore cannot be used to manage lifetime of objects directly (unlike spinlocks and refcounts). [1][2] Use a kref to release the driver data to avoid use-after-free in mutex_unlock() when release() races with disconnect(). [1] a51749ab34d9 (\"locking/mutex: Document that mutex_unlock() is non-atomic\") [2] 2b9d9e0a9ba0 (\"locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked\")",
"evidence": "osv:CVE-2026-64340",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.261",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.212",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.178",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.145",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.96",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.39",
"evidence": "/affected/1/ranges"
},
{
"value": "7.1.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-64340",
"aliases": [
"CVE-2026-64340"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "18bcbcfe9ca2308ebffb40068b51803da9315d97"
},
{
"fixed": "11d069f85851997b4ea0adf242ed9672dc749b8f"
},
{
"fixed": "b4222c05066b252b451f9c8c4730b5b60824ea66"
},
{
"fixed": "6462de75d2e370c7e74dcfb7b4ae79eb5a6a55ee"
},
{
"fixed": "0b57e5ddbd89df3bc367463de3d2ca66f99a1a5e"
},
{
"fixed": "ab2bfd7bec4f134b377ec42f513e90c35db94160"
},
{
"fixed": "766738ecf2b819e54d38763c8d1c8ae6cff14b39"
},
{
"fixed": "9ba62966461a8e3cc593b62c56ec62eb2d80436d"
},
{
"fixed": "62fc8eb1b1481051f7bab4aa93d79809053dd09f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64340.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.25"
},
{
"fixed": "5.10.261"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.212"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.178"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.145"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.96"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.39"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.1.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64340.json"
}
}
],
"modified": "2026-10-28T02:30:29.377547643Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0b57e5ddbd89df3bc367463de3d2ca66f99a1a5e",
"https://git.kernel.org/stable/c/11d069f85851997b4ea0adf242ed9672dc749b8f",
"https://git.kernel.org/stable/c/62fc8eb1b1481051f7bab4aa93d79809053dd09f",
"https://git.kernel.org/stable/c/6462de75d2e370c7e74dcfb7b4ae79eb5a6a55ee",
"https://git.kernel.org/stable/c/766738ecf2b819e54d38763c8d1c8ae6cff14b39",
"https://git.kernel.org/stable/c/9ba62966461a8e3cc593b62c56ec62eb2d80436d",
"https://git.kernel.org/stable/c/ab2bfd7bec4f134b377ec42f513e90c35db94160",
"https://git.kernel.org/stable/c/b4222c05066b252b451f9c8c4730b5b60824ea66",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64340.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-64340",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64340.json"
}
},
"related_cves": [
{
"value": "CVE-2026-64340",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 496031,
"published_at": "2026-07-25T08:50:03.896+00:00"
}