CVE-2025-40336
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40336 is a vulnerability in the Linux kernel's drm/gpusvm subsystem related to incorrect usage of hmm_pfn_to_map_order(). The flaw occurs when an HMM (Heterogeneous Memory Management) range partially covers a huge page (e.g., 2MB), potentially causing memory outside the intended range — and possibly not mapped by the memory manager — to be mapped. It was published on December 9, 2025, and affects Linux kernel versions prior to 6.17.8 and 6.18. The CVSS base score is listed as 0.0 (no severity rating assigned at time of publication) (ENISA EUVD).

Technical details

The root cause is improper handling of partial huge page coverage within the drm/gpusvm subsystem's HMM range processing logic (CWE classification not formally assigned, but relates to incorrect memory mapping/boundary handling). When hmm_pfn_to_map_order() returns a map order for a huge page that only partially overlaps the requested HMM range, the code previously failed to account for this misalignment, potentially mapping memory beyond the intended range. The fix aligns the gpusvm logic with the existing xe userptr code, using ilog2() instead of fls() and adding proper boundary checks. Patches are available as kernel commits 08e9fd78ba1b (stable branch) and c50729c68aaf (ENISA EUVD, Kernel Patch 1, Kernel Patch 2).

Impact

Exploitation of this vulnerability could result in incorrect memory mappings within GPU SVM operations, potentially exposing memory regions outside the intended HMM range to GPU access. This may lead to information disclosure (reading memory not belonging to the process), memory corruption, or undefined behavior in GPU-accelerated workloads. The impact is primarily local to systems using GPU SVM with HMM-backed huge pages, and lateral movement potential is limited given the local nature of the flaw (ENISA EUVD).

Mitigation and workarounds

The fix is included in Linux kernel versions 6.17.8 and 6.18. Users should update to these patched versions or apply the relevant stable kernel commits (08e9fd78ba1b9e95141181c69cc51795c9888157 for one branch and c50729c68aaf93611c855752b00e49ce1fdd1558 for another). No configuration-based workaround is documented; upgrading the kernel is the recommended remediation (ENISA EUVD, Kernel Patch 1, Kernel Patch 2).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management