WSL2-Linux-Kernel/drivers/dma-buf
Jordy Zomer 92c4cfaee6 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 <jordy@pwning.systems>
Fixes: c02a81fba7 ("dma-buf: Add dma-buf heaps framework")
Cc: <stable@vger.kernel.org> # v5.6+
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
 [sumits: added fixes and cc: stable tags]
Link: https://patchwork.freedesktop.org/patch/msgid/20220129150604.3461652-1-jordy@pwning.systems
2022-02-01 13:18:09 +05:30
..
heaps dma-buf: cma_heap: Fix mutex locking section 2022-01-13 16:35:21 +05:30
Kconfig
Makefile
dma-buf-sysfs-stats.c kobject: remove kset from struct kset_uevent_ops callbacks 2021-12-28 11:26:18 +01:00
dma-buf-sysfs-stats.h
dma-buf.c
dma-fence-array.c
dma-fence-chain.c
dma-fence.c
dma-heap.c dma-buf: heaps: Fix potential spectre v1 gadget 2022-02-01 13:18:09 +05:30
dma-resv.c
selftest.c
selftest.h
selftests.h
st-dma-fence-chain.c
st-dma-fence.c
st-dma-resv.c
sw_sync.c
sync_debug.c
sync_debug.h
sync_file.c
sync_trace.h
udmabuf.c