CVE-2025-38596 drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code
A use-after-free vulnerability in the Linux kernel Panthor GPU driver debugfs code allows attackers to potentially execute arbitrary code or escalate privileges.
- 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-2025-38596?
CVE-2025-38596 is a high-severity use after free vulnerability in Linux kernel, published on 19 Aug 2025. 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:
drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code
The object is potentially already gone after the drm_gem_object_put(). In general the object should be fully constructed before calling drm_gem_handle_create(), except the debugfs tracking uses a separate lock and list and separate flag to denotate whether the object is actually initialized.
Since I'm touching this all anyway simplify this by only adding the object to the debugfs when it's ready for that, which allows us to delete that separate flag. panthor_gem_debugfs_bo_rm() already checks whether we've actually been added to the list or this is some error path cleanup.
v2: Fix build issues for !CONFIG_DEBUGFS (Adrián)
v3: Add linebreak and remove outdated comment (Liviu)
Weakness: CWE-416
Which versions are affected by CVE-2025-38596?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38596?
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-2025-38596 being exploited?
There is no known exploitation of CVE-2025-38596 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-38596, GHSA-c5gg-23m2-rg93, UBUNTU-CVE-2025-38596.