dma-buf: heaps: Fix potential spectre v1 gadget
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:
dma-buf: heaps: Fix potential spectre v1 gadget
It appears like nr could be a Spectre v1 gadget as it's supplied by a user and used as an array index. Prevent the contents of kernel memory from being leaked to userspace via speculative execution by using array_index_nospec.
[sumits: added fixes and cc: stable tags]
From the CVE record · Linux
A user-supplied array index in the Linux kernel's dma-buf heaps could act as a Spectre v1 gadget. A local user could potentially leak kernel memory into userspace through speculative execution; no additional user interaction is described.
Anyone running a Linux kernel with the affected dma-buf heaps code should check their kernel vendor's advisory; affected versions were not provided.