CVE-2026-64340 USB: legousbtower: fix use-after-free on disconnect race

High 7.8 Published Updated

A race condition in the Linux kernel's legousbtower USB driver allows attackers to trigger a use-after-free, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-64340?

CVE-2026-64340 is a high-severity use after free vulnerability in Linux kernel, published on 25 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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")

Weakness: CWE-416

Which versions are affected by CVE-2026-64340?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2026-64340?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2026-64340 being exploited?

There is no known exploitation of CVE-2026-64340 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2026-64340, DEBIAN-CVE-2026-64340, GHSA-p757-fg2x-77h8, ROOT-OS-UBUNTU-2204-CVE-2026-64340, UBUNTU-CVE-2026-64340.

Is CVE-2026-64340 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free