drm/nouveau/dmem: pin VRAM for the whole registered range
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/nouveau/dmem: pin VRAM for the whole registered range
Commit c32287471077 ("gpu/drm/nouveau: enable THP support for GPU memory migration") grew the device-private region that nouveau_dmem_chunk_alloc() registers from DMEM_CHUNK_SIZE to DMEM_CHUNK_SIZE * NR_CHUNKS, but left the VRAM buffer object backing that region at DMEM_CHUNK_SIZE.
nouveau_dmem_page_addr() returns chunk->bo->offset plus the page's offset within the registered region, so every page past the first chunk resolves to VRAM outside the buffer object.
Size the buffer object to the region it backs.
From the CVE record · Linux
The nouveau dmem code registers a device-private region larger than its backing VRAM buffer object. Pages beyond the first chunk therefore resolve to VRAM outside that object. The input does not specify an attack path, authentication requirement, or user interaction.
Teams running Linux kernels with nouveau dmem should check whether their kernel includes this issue; affected versions are not specified.