Linux kernel out-of-bounds free in i915 relocation parsing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8e4ba491b0ba6fef69270d3c4e48fc517096ef41 · < 152fb5083b9333a1cb8629572f9e0f276a404ba6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/i915/gem: Prevent overstepping exec array boundary
It is possible for eb_relocate_parse_slow() to call kvfree() on entries outside the original exec array during following scenario inside eb_relocate_parse_slow():
1) eb_copy_relocations() allocates as many as eb->buffer_count copies for exec entries; 2) eb_parse() appends up to two VMAs, right after incrementing eb->buffer_count; 3) cleanup under "out" label uses this incremented buffer_count to release relocation pointers from exec array via kvfree(), not from VMA array.
To amend this problem, ensure that relocation cleanup uses the original exec object count, excluding the VMAs appended by the command parser.
(cherry picked from commit 2a0158925fb943c7ba8f3216e2734952128defc9)
From the CVE record · Linux
The Linux kernel’s drm/i915/gem relocation cleanup can call kvfree() on entries beyond the original exec array when command parsing appends VMAs. This can cause an invalid free; the input does not specify attacker access requirements or whether user interaction is needed.
Engineers running Linux kernels with the affected drm/i915/gem code should check their kernel versions; affected versions are not specified.