Linux kernel reference leak in Imagination GPU mapping remap
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/imagination: Fix reference and vm_bo handling in remap()
When a map overlaps part of an existing mapping, pvr_vm_gpuva_remap() splits the mapping into prev/next parts covering what the request did not take, instead of creating something new. It gets two things wrong.
- A GEM reference is taken for each part but it's never needed and never dropped, so it leaks one reference per split (remap-next-in-2m in tests/imagination/pvr_vm_map.c):
CRITICAL: 33558528 bytes of shmem still held after close
- The parts still belong to the original object being split, but pvr_vm_gpuva_remap() links them to ctx->gpuvm_bo, the new object's vm_bo:
prev_va --obj--> BO_A BO_B <--obj-- vm_bo (ctx->gpuvm_bo) \___________link___________/ (mismatch: BO_A != BO_B)
drm_gpuva_link() catches the mismatch:
From the CVE record · Linux
The Linux kernel’s Imagination DRM driver mishandles a GPU virtual-memory remap that overlaps an existing mapping. When a mapping is split, it leaks a GEM reference for each part and links the parts to the wrong object, triggering a warning. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with the Imagination DRM driver should check their versions; affected versions are not specified.