CVE-2025-40332: drm/amdkfd: Fix mmap write lock not release
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 svmrangerestorepages calls mmapreadunlock 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In drm/amdkfd, downgrade the mmap write lock to a read lock when draining a retry fault, and ensure svm_range_restore_pages does not return while leaving the mmap write lock unreleased or call mmap_read_unlock for an active write lock.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40332?
CVE-2025-40332 has been classified as a medium severity vulnerability.
How do I fix CVE-2025-40332?
To fix CVE-2025-40332, update your Linux kernel to the latest stable version that contains the patches.
What are the potential impacts of CVE-2025-40332?
CVE-2025-40332 may lead to a denial of service condition due to the improper handling of mmap write locks.
Which versions of Linux kernel are affected by CVE-2025-40332?
CVE-2025-40332 affects multiple versions of the Linux kernel prior to the application of the relevant patch.
Is CVE-2025-40332 exploitative in nature?
CVE-2025-40332 could be exploited under specific conditions to impact system stability.