drm/i915: Fix a memory leak with reused mmap_offset
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/i915: Fix a memory leak with reused mmap_offset
drm_vma_node_allow() and drm_vma_node_revoke() should be called in balanced pairs. We call drm_vma_node_allow() once per-file everytime a user calls mmap_offset, but only call drm_vma_node_revoke once per-file on each mmap_offset. As the mmap_offset is reused by the client, the per-file vm_count may remain non-zero and the rbtree leaked.
Call drm_vma_node_allow_once() instead to prevent that memory leak.
From the CVE record · Linux
The Linux kernel's drm/i915 component can leak memory when a client repeatedly calls mmap_offset. A local user making those calls can leave a per-file reference count non-zero, leaking an rbtree; the input does not specify additional authentication or interaction requirements.
Engineers running Linux kernels with drm/i915 should check their installations; affected versions were not provided.