summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-at91.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-06-30 01:08:44 +0300
committerJiri Kosina <jkosina@suse.cz>2018-07-09 15:31:14 +0300
commit4f65245f2d178b9cba48350620d76faa4a098841 (patch)
tree640f4a6c360ea79716616a53003e689ec664f96c /drivers/pinctrl/pinctrl-at91.h
parentef6eaf27274c0351f7059163918f3795da13199c (diff)
downloadlinux-4f65245f2d178b9cba48350620d76faa4a098841.tar.xz
HID: hiddev: fix potential Spectre v1
uref->field_index, uref->usage_index, finfo.field_index and cinfo.index can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/hid/usbhid/hiddev.c:473 hiddev_ioctl_usage() warn: potential spectre issue 'report->field' (local cap) drivers/hid/usbhid/hiddev.c:477 hiddev_ioctl_usage() warn: potential spectre issue 'field->usage' (local cap) drivers/hid/usbhid/hiddev.c:757 hiddev_ioctl() warn: potential spectre issue 'report->field' (local cap) drivers/hid/usbhid/hiddev.c:801 hiddev_ioctl() warn: potential spectre issue 'hid->collection' (local cap) Fix this by sanitizing such structure fields before using them to index report->field, field->usage and hid->collection Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.h')
0 files changed, 0 insertions, 0 deletions