lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 May 2021 20:07:44 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Johan Hovold <johan@...nel.org>
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] USB: trancevibrator: fix control-request direction

On Fri, May 21, 2021 at 03:31:09PM +0200, Johan Hovold wrote:
> The direction of the pipe argument must match the request-type direction
> bit or control requests may fail depending on the host-controller-driver
> implementation.
> 
> Fix the set-speed request which erroneously used USB_DIR_IN and update
> the default timeout argument to match (same value).
> 
> Fixes: 5638e4d92e77 ("USB: add PlayStation 2 Trance Vibrator driver")
> Cc: stable@...r.kernel.org      # 2.6.19
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  drivers/usb/misc/trancevibrator.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c
> index a3dfc77578ea..26baba3ab7d7 100644
> --- a/drivers/usb/misc/trancevibrator.c
> +++ b/drivers/usb/misc/trancevibrator.c
> @@ -61,9 +61,9 @@ static ssize_t speed_store(struct device *dev, struct device_attribute *attr,
>  	/* Set speed */
>  	retval = usb_control_msg(tv->udev, usb_sndctrlpipe(tv->udev, 0),
>  				 0x01, /* vendor request: set speed */
> -				 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
> +				 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
>  				 tv->speed, /* speed value */
> -				 0, NULL, 0, USB_CTRL_GET_TIMEOUT);
> +				 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
>  	if (retval) {
>  		tv->speed = old;
>  		dev_dbg(&tv->udev->dev, "retval = %d\n", retval);
> -- 
> 2.26.3
> 

Thanks for searching the whole tree for these mistakes, nice work!

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ