commit | 58880025e3362024f6d8ea01cb0c7a5df6c84ba6 | [log] [tgz] |
---|---|---|
author | Jordy Zomer <jordy@jordyzomer.github.io> | Sat Jan 29 15:58:39 2022 +0100 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Wed Apr 20 09:08:27 2022 +0200 |
tree | 1fddd1e060f5ba9b9a330bbd6f68b99a6ce0c718 | |
parent | 5e580cce4d58b35e0ceb875578a53b49cc2e98b1 [diff] |
dm ioctl: prevent potential spectre v1 gadget [ Upstream commit cd9c88da171a62c4b0f1c70e50c75845969fbc18 ] 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: Jordy Zomer <jordy@pwning.systems> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>