Re: KMSAN: uninit-value in alauda_check_media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> This thread has been dormant for over a year and a half.  Let's revive 
> it and try to close out the issue.
>
> Alan Stern
>
> #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ v6.5-rc3

Your commands are accepted, but please keep syzkaller-bugs@xxxxxxxxxxxxxxxx mailing list in CC next time. It serves as a history of what happened with each bug report. Thank you.

>
> Index: usb-devel/drivers/usb/storage/alauda.c
> ===================================================================
> --- usb-devel.orig/drivers/usb/storage/alauda.c
> +++ usb-devel/drivers/usb/storage/alauda.c
> @@ -318,7 +318,8 @@ static int alauda_get_media_status(struc
>  	rc = usb_stor_ctrl_transfer(us, us->recv_ctrl_pipe,
>  		command, 0xc0, 0, 1, data, 2);
>  
> -	usb_stor_dbg(us, "Media status %02X %02X\n", data[0], data[1]);
> +	if (rc == USB_STOR_XFER_GOOD)
> +		usb_stor_dbg(us, "Media status %02X %02X\n", data[0], data[1]);
>  
>  	return rc;
>  }
> @@ -454,9 +455,14 @@ static int alauda_init_media(struct us_d
>  static int alauda_check_media(struct us_data *us)
>  {
>  	struct alauda_info *info = (struct alauda_info *) us->extra;
> -	unsigned char status[2];
> +	unsigned char *status = us->iobuf;
> +	int rc;
>  
> -	alauda_get_media_status(us, status);
> +	rc = alauda_get_media_status(us, status);
> +	if (rc != USB_STOR_XFER_GOOD) {
> +		status[0] = 0xF0;	/* Pretend there's no media */
> +		status[1] = 0;
> +	}
>  
>  	/* Check for no media or door open */
>  	if ((status[0] & 0x80) || ((status[0] & 0x1F) == 0x10)



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux