CVE-2025-38520
BaseFortify
Publication date: 2025-08-16
Last updated on: 2025-11-03
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.1.153 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel's drm/amdkfd component involves improper handling of memory management unit (MMU) notifier callbacks. Specifically, calling mmput from within an MMU notifier callback when a process is exiting can release the last reference to a memory structure (mm struct), triggering exit_mmap and free_pgtable functions that cause a deadlock. This deadlock prevents the release of the kfd process and leads to VRAM leaking. The issue arises during operations like compactd, fork, or NUMA balancing. The fix involves properly managing references by taking a non-zero mm reference when adding prange to a deferred list to avoid the deadlock.
How can this vulnerability impact me? :
This vulnerability can cause a deadlock in the Linux kernel, which results in a hung task and leaking of VRAM resources. This can degrade system stability and performance, potentially causing processes to block indefinitely and consume GPU memory unnecessarily, which may affect applications relying on AMD GPU functionality.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for hung or blocked tasks related to the amdkfd driver in the Linux kernel. Specifically, look for processes blocked for an unusually long time (e.g., thousands of seconds) with backtraces involving mmput, exit_mmap, and amdgpu kernel modules. Commands such as 'dmesg' or 'journalctl -k' can be used to check kernel logs for messages like 'task <process_name> blocked for more than <time> seconds' and the associated backtrace. Additionally, using 'ps' or 'top' to identify processes stuck in uninterruptible sleep (D state) may help detect symptoms of this deadlock.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation is to update the Linux kernel to a version that includes the fix for this vulnerability, which involves changes to the amdkfd driver to avoid calling mmput from the MMU notifier callback. Until the update is applied, avoid workloads or operations that trigger heavy memory management activities such as compactd, fork, or NUMA balancing on systems using the affected amdkfd driver to reduce the risk of deadlocks and VRAM leaks.