# CVE-2025-40336: drm/gpusvm: fix hmm_pfn_to_map_order() usage

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-12-09T04:09:52.845Z
- Modified: 2026-10-15T22:19:08.797Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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)

(As written by CVE List.)

## Affected

- Linux Linux: from 99624bdff8670795b678eafa6509aaad3a5c0175 before 08e9fd78ba1b9e95141181c69cc51795c9888157; from 99624bdff8670795b678eafa6509aaad3a5c0175 before c50729c68aaf93611c855752b00e49ce1fdd1558; 6.15 (not affected: before 6.15; from 6.17.8 up to 6.17.*; from 6.18 up to *)

## References

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

## Sources

- CVE List: [CVE-2025-40336](https://www.cve.org/CVERecord?id=CVE-2025-40336), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2025-40336](https://nvd.nist.gov/vuln/detail/CVE-2025-40336), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2025-40336 · Whole record: https://cve.day/CVE-2025-40336.json · Rebuilt by cve.day 2026-11-25T22:59:08.474Z
