Skip to main content
EPSS 0.2%top 93%

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)

0
High
Published: 12/09/2025 (12/09/2025, 18:30:36 UTC)
Source: GCVE Database

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

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 17:53:43 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses