Re: [PATCH 02/10] USB: cdc-acm: more sanity checking

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

 



I am sorry. This email was sent out due to an incorrect operation.
Please ignore it. I am sorry for disturbing you.

Best regards,
Baolu

On 03/25/2016 10:58 AM, Lu Baolu wrote:
> From: Oliver Neukum <oneukum@xxxxxxxx>
>
> An attack has become available which pretends to be a quirky
> device circumventing normal sanity checks and crashes the kernel
> by an insufficient number of interfaces. This patch adds a check
> to the code path for quirky devices.
>
> Signed-off-by: Oliver Neukum <ONeukum@xxxxxxxx>
> CC: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/class/cdc-acm.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> index 1d2c99a..83fd30b 100644
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
> @@ -1179,6 +1179,9 @@ static int acm_probe(struct usb_interface *intf,
>  	if (quirks == NO_UNION_NORMAL) {
>  		data_interface = usb_ifnum_to_if(usb_dev, 1);
>  		control_interface = usb_ifnum_to_if(usb_dev, 0);
> +		/* we would crash */
> +		if (!data_interface || !control_interface)
> +			return -ENODEV;
>  		goto skip_normal_probe;
>  	}
>  

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]