Commit db5d95ad authored by Jordy Zomer's avatar Jordy Zomer Committed by Yongqiang Liu
Browse files

dm ioctl: prevent potential spectre v1 gadget

stable inclusion
from stable-4.19.238
commit 7ae2c5b89da3cfaf856df880af27d3bb32a74b3d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5A6BA


CVE: NA

--------------------------------

[ 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>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 394ec9b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment