Re: [PATCH] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-17 Thread Gustavo A. R. Silva
On 05/17/2018 02:15 PM, Greg Kroah-Hartman wrote: Shouldn't we just do this in one place, in the valid_port() function? That way it keeps the range checking logic in one place (now it is in 3 places in the function), which should make maintenance much simpler. Yep, I thought about that, the

Re: [PATCH] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-17 Thread Greg Kroah-Hartman
On Thu, May 17, 2018 at 12:57:49PM -0500, Gustavo A. R. Silva wrote: > Hi Greg, > > On 05/17/2018 01:51 AM, Greg Kroah-Hartman wrote: > > On Wed, May 16, 2018 at 05:22:00PM -0500, Gustavo A. R. Silva wrote: > > > pdev_nr and rhport can be controlled by user-space, hence leading to > > > a potentia

Re: [PATCH] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-17 Thread Gustavo A. R. Silva
Hi Greg, On 05/17/2018 01:51 AM, Greg Kroah-Hartman wrote: On Wed, May 16, 2018 at 05:22:00PM -0500, Gustavo A. R. Silva wrote: pdev_nr and rhport can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the

Re: [PATCH] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-16 Thread Greg Kroah-Hartman
On Wed, May 16, 2018 at 05:22:00PM -0500, Gustavo A. R. Silva wrote: > pdev_nr and rhport can be 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/usb/usbip/vhci_sysfs.c:238 d