CVE-2025-40336

Source
https://cve.org/CVERecord?id=CVE-2025-40336
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40336.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-40336
Downstream
Published
2025-12-09T04:09:52.845Z
Modified
2026-01-02T20:48:37.891080Z
Summary
drm/gpusvm: fix hmm_pfn_to_map_order() usage
Details

In the Linux kernel, the following vulnerability has been resolved:

drm/gpusvm: fix hmmpfntomaporder() 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)

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40336.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
99624bdff8670795b678eafa6509aaad3a5c0175
Fixed
08e9fd78ba1b9e95141181c69cc51795c9888157
Fixed
c50729c68aaf93611c855752b00e49ce1fdd1558

Affected versions

v6.*
v6.14
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.2
v6.17.3
v6.17.4
v6.17.5
v6.17.6
v6.17.7

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40336.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.15.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40336.json"