VYPR
Unrated severityNVD Advisory· Published Dec 9, 2025· Updated Apr 15, 2026

CVE-2025-40332

CVE-2025-40332

Description

In the Linux kernel, the following vulnerability has been resolved:

drm/amdkfd: Fix mmap write lock not release

If mmap write lock is taken while draining retry fault, mmap write lock is not released because svm_range_restore_pages calls mmap_read_unlock then returns. This causes deadlock and system hangs later because mmap read or write lock cannot be taken.

Downgrade mmap write lock to read lock if draining retry fault fix this bug.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's drm/amdkfd, a missing mmap write lock release during retry fault draining causes a deadlock; fix downgrades write lock to read lock.

Vulnerability

The vulnerability resides in the Linux kernel's drm/amdkfd driver. When handling retry faults, the function svm_range_restore_pages takes the mmap write lock but, in the draining retry fault path, inadvertently calls mmap_read_unlock instead of releasing the write lock, leaving the lock held. This occurs because the write lock is not properly released before the function returns.

Exploitation

An attacker with local access and the ability to trigger GPU page faults can exploit this bug. The attack surface is limited to systems using AMD GPUs with the amdkfd driver. No authentication is required beyond local user access. By inducing retry faults, the attacker can cause the mmap write lock to be permanently held, preventing other threads from acquiring read or write locks.

Impact

Successful exploitation leads to a deadlock, causing the system to hang. This can result in a denial of service (DoS) as subsequent mmap operations cannot proceed. The vulnerability does not directly allow privilege escalation or data corruption.

Mitigation

The fix has been upstreamed in the Linux kernel commit 7574f30337e19045f03126b4c51f525b84e5049e [1]. Users should apply the latest kernel updates to their distributions. No known workarounds exist; updating the kernel is the recommended solution.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

3

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.