drm/gpusvm: fix hmm_pfn_to_map_order() usage
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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)
From the CVE record · Linux
The Linux kernel’s drm/gpusvm code can mishandle an HMM range that partially covers a huge page. This can result in memory being mapped outside the range, potentially including memory not mapped by the process. The input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels that use drm/gpusvm should check whether their kernel is affected; affected versions were not provided.