CVE-2025-40191 drm/amdkfd: Fix kfd process ref leaking when userptr unmapping
A reference counting bug in the Linux kernel's AMD KFD driver can lead to resource leaks and potential denial of service when unmapping user pointers.
- 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-40191?
CVE-2025-40191 is a memory corruption vulnerability in Linux, published on 12 Nov 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/amdkfd: Fix kfd process ref leaking when userptr unmapping
kfd_lookup_process_by_pid hold the kfd process reference to ensure it doesn't get destroyed while sending the segfault event to user space.
Calling kfd_lookup_process_by_pid as function parameter leaks the kfd process refcount and miss the NULL pointer check if app process is already destroyed.
Which versions are affected by CVE-2025-40191?
How do I fix CVE-2025-40191?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2025-40191 being exploited?
There is no known exploitation of CVE-2025-40191 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40191, DEBIAN-CVE-2025-40191, GHSA-6p7f-xr2h-v9qh, UBUNTU-CVE-2025-40191.