Commit 588afcc1 authored by Oliver Neukum's avatar Oliver Neukum Committed by Mauro Carvalho Chehab

[media] usbvision fix overflow of interfaces array

This fixes the crash reported in:
The interface number needs a sanity check.
Signed-off-by: default avatarOliver Neukum <>
Cc: Vladis Dronov <>
Signed-off-by: default avatarHans Verkuil <>
Signed-off-by: default avatarMauro Carvalho Chehab <>
parent 3ff863b8
......@@ -1461,6 +1461,13 @@ static int usbvision_probe(struct usb_interface *intf,
printk(KERN_INFO "%s: %s found\n", __func__,
* this is a security check.
* an exploit using an incorrect bInterfaceNumber is known
if (ifnum >= USB_MAXINTERFACES || !dev->actconfig->interface[ifnum])
return -ENODEV;
if (usbvision_device_data[model].interface >= 0)
interface = &dev->actconfig->interface[usbvision_device_data[model].interface]->altsetting[0];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment