CVE-2025-38520
📋 TL;DR
A race condition in the Linux kernel's AMD GPU driver (amdkfd) can cause a deadlock when a process exits while memory management operations are in progress. This vulnerability affects Linux systems with AMD GPUs using the amdgpu driver, potentially causing system hangs and VRAM memory leaks.
💻 Affected Systems
- Linux kernel with AMD GPU driver (amdgpu)
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
System becomes unresponsive (deadlock) requiring hard reboot, with persistent VRAM memory leaks that could degrade GPU performance over time.
Likely Case
Occasional system hangs during memory-intensive operations or process termination, with gradual VRAM memory leaks affecting GPU-accelerated applications.
If Mitigated
Minor performance impact during memory management operations with no system instability.
🎯 Exploit Status
Exploitation requires triggering specific race conditions during process exit while memory operations are active. Likely requires local access or ability to run malicious code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel with commit a29e067bd38946f752b0ef855f3dfff87e77bec7 or later
Vendor Advisory: https://git.kernel.org/stable/c/145a56bd68f4bff098d59fbc7c263d20dfef4fc4
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commit. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load patched kernel.
🔧 Temporary Workarounds
Disable AMD KFD module
LinuxPrevent loading of the vulnerable amdkfd kernel module if AMD GPU compute features are not required.
echo 'blacklist amdkfd' >> /etc/modprobe.d/blacklist-amdkfd.conf
update-initramfs -u
reboot
🧯 If You Can't Patch
- Monitor system for hung tasks and memory leaks, restart affected services if detected
- Limit GPU memory allocation to trusted users/processes only
🔍 How to Verify
Check if Vulnerable:
Check if amdkfd module is loaded: lsmod | grep amdkfd. If loaded and kernel version predates fix commit, system is vulnerable.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commit: git log --oneline | grep 'a29e067bd38946f752b0ef855f3dfff87e77bec7' or check kernel changelog.
📡 Detection & Monitoring
Log Indicators:
- Kernel logs showing hung tasks related to python/amdgpu processes
- System logs showing processes stuck in 'D' (uninterruptible sleep) state
- dmesg output showing memory management errors
Network Indicators:
- None - this is a local kernel vulnerability
SIEM Query:
Process:State='D' AND Process:Name CONTAINS 'python' AND Process:CommandLine CONTAINS 'amdgpu'
🔗 References
- https://git.kernel.org/stable/c/145a56bd68f4bff098d59fbc7c263d20dfef4fc4
- https://git.kernel.org/stable/c/a7eb0a25010a674c8fdfbece38353ef7be8c5834
- https://git.kernel.org/stable/c/c1bde9d48e09933c361521720f77a8072083c83a
- https://git.kernel.org/stable/c/cf234231fcbc7d391e2135b9518613218cc5347f
- https://git.kernel.org/stable/c/e90ee15ce28c61f6d83a0511c3e02e2662478350
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html