CVE-2026-31575: mm/userfaultfd: fix hugetlb fault mutex hash calculation
In the Linux kernel, the following vulnerability has been resolved:
mm/userfaultfd: fix hugetlb fault mutex hash calculation
In mfillatomichugetlb(), linearpageindex() is used to calculate the page index for hugetlbfaultmutexhash(). However, linearpageindex() returns the index in PAGESIZE units, while hugetlbfaultmutexhash() expects the index in huge page units. This mismatch means that different addresses within the same huge page can produce different hash values, leading to the use of different mutexes for the same huge page. This can cause races between faulting threads, which can corrupt the reservation map and trigger the BUGON in resvmaprelease().
Fix this by introducing hugetlblinearpageindex(), which returns the page index in huge page granularity, and using it in place of linearpageindex().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Compensating control
Introduce hugetlb_linear_page_index(), which returns the page index in huge-page granularity, and use it in place of linear_page_index() when calculating the index for hugetlb_fault_mutex_hash().
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31575?
CVE-2026-31575 has a medium severity rating due to its impact on hugetlb fault mutex hash calculations.
How do I fix CVE-2026-31575?
To fix CVE-2026-31575, you should update your Linux kernel to the latest stable version where this vulnerability has been patched.
What software is affected by CVE-2026-31575?
CVE-2026-31575 affects the Linux kernel specifically in its management of hugetlb memory.
Can CVE-2026-31575 lead to system crashes?
While CVE-2026-31575 is a vulnerability, it may not directly lead to system crashes but can affect system stability under certain conditions.
Is CVE-2026-31575 a remote or local vulnerability?
CVE-2026-31575 is considered a local vulnerability as it requires local access to exploit.