Skip to content
Commit 0320bac5 authored by Jordy Zomer's avatar Jordy Zomer Committed by Greg Kroah-Hartman
Browse files

dm ioctl: prevent potential spectre v1 gadget

[ Upstream commit cd9c88da

 ]

It appears like cmd 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: default avatarJordy Zomer <jordy@pwning.systems>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 73dd98ac
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment