In the Linux kernel, the following vulnerability has been resolved: drm/gpusvm: fix hmm_pfn_to_map_order() usage Handle the case where the hmm range… (CVE-2025-40336)
A high-severity vulnerability in the Linux kernel's drm/gpusvm component was resolved by fixing the usage of hmm_pfn_to_map_order(). The issue involved improper handling of cases where the HMM range partially covers a huge page, potentially leading to mapping memory outside the intended range and possibly unmapped by the memory manager. This could result in severe confidentiality, integrity, and availability impacts. The fix aligns the code with the xe userptr implementation and includes kernel documentation improvements.
AI Analysis
Technical Summary
CVE-2025-40336 addresses a vulnerability in the Linux kernel's drm/gpusvm subsystem where the function hmm_pfn_to_map_order() did not correctly handle HMM ranges partially covering huge pages (e.g., 2M pages). This flaw could cause the kernel to map memory regions outside the specified range, including memory not mapped by the process's memory manager, leading to potential unauthorized memory access or corruption. The patch corrects this by adopting logic from the xe userptr code, ensuring proper alignment and range checking. The vulnerability affects kernel memory management related to GPU shared virtual memory and was fixed in a kernel update.
Potential Impact
The vulnerability allows potential mapping of memory outside the intended HMM range, which could lead to unauthorized access to memory regions, compromising confidentiality and integrity. It also poses a risk to system stability and availability due to possible memory corruption or improper memory mappings. The CVSS vector indicates local attack complexity with low privileges required, no user interaction, and a scope change, resulting in high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix for this vulnerability has been implemented in the Linux kernel. Users and administrators should apply the official kernel updates that include this patch to remediate the issue. Since this is a kernel-level vulnerability, upgrading to the fixed kernel version is the recommended mitigation. Patch status is not explicitly confirmed in the provided data; therefore, verify with the official Linux kernel advisories or vendor updates for the exact fixed versions and apply them accordingly.
In the Linux kernel, the following vulnerability has been resolved: drm/gpusvm: fix hmm_pfn_to_map_order() usage Handle the case where the hmm range… (CVE-2025-40336)
Description
A high-severity vulnerability in the Linux kernel's drm/gpusvm component was resolved by fixing the usage of hmm_pfn_to_map_order(). The issue involved improper handling of cases where the HMM range partially covers a huge page, potentially leading to mapping memory outside the intended range and possibly unmapped by the memory manager. This could result in severe confidentiality, integrity, and availability impacts. The fix aligns the code with the xe userptr implementation and includes kernel documentation improvements.
CVSS v3.1
Score 8.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-40336 addresses a vulnerability in the Linux kernel's drm/gpusvm subsystem where the function hmm_pfn_to_map_order() did not correctly handle HMM ranges partially covering huge pages (e.g., 2M pages). This flaw could cause the kernel to map memory regions outside the specified range, including memory not mapped by the process's memory manager, leading to potential unauthorized memory access or corruption. The patch corrects this by adopting logic from the xe userptr code, ensuring proper alignment and range checking. The vulnerability affects kernel memory management related to GPU shared virtual memory and was fixed in a kernel update.
Potential Impact
The vulnerability allows potential mapping of memory outside the intended HMM range, which could lead to unauthorized access to memory regions, compromising confidentiality and integrity. It also poses a risk to system stability and availability due to possible memory corruption or improper memory mappings. The CVSS vector indicates local attack complexity with low privileges required, no user interaction, and a scope change, resulting in high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix for this vulnerability has been implemented in the Linux kernel. Users and administrators should apply the official kernel updates that include this patch to remediate the issue. Since this is a kernel-level vulnerability, upgrading to the fixed kernel version is the recommended mitigation. Patch status is not explicitly confirmed in the provided data; therefore, verify with the official Linux kernel advisories or vendor updates for the exact fixed versions and apply them accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-5gqx-mjr7-rp8x
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40336"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d49c2644c7f8478f23
Added to database: 07/30/2026, 15:50:44 UTC
Last enriched: 07/30/2026, 17:53:43 UTC
Last updated: 09/10/2026, 19:26:51 UTC
Views: 30
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.