Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Signed-off-by: Jordy Zomer <[email protected]> Fixes: c02a81f ("dma-buf: Add dma-buf heaps framework") Cc: <[email protected]> # v5.6+ Acked-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> [sumits: added fixes and cc: stable tags] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
- Loading branch information