Re: [PATCH v2] HID: hiddev: fix potential Spectre v1

2018-10-26 Thread Jiri Kosina
On Fri, 19 Oct 2018, Breno Leitao wrote: > uref->usage_index can be indirectly controlled by userspace, hence leading > to a potential exploitation of the Spectre variant 1 vulnerability. > > This field is used as an array index by the hiddev_ioctl_usage() function, > when 'cmd' is either HIDIOCG

[PATCH v2] HID: hiddev: fix potential Spectre v1

2018-10-19 Thread Breno Leitao
uref->usage_index can be indirectly controlled by userspace, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This field is used as an array index by the hiddev_ioctl_usage() function, when 'cmd' is either HIDIOCGCOLLECTIONINDEX, HIDIOCGUSAGES or HIDIOCSUSAGES. Fo