Commit e13c594f authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

USB: fix oops in cdc-wdm in case of malformed descriptors

cdc-wdm needs to ignore extremely malformed descriptors.
Signed-off-by: default avatarOliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f05932c0
...@@ -652,7 +652,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -652,7 +652,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
iface = &intf->altsetting[0]; iface = &intf->altsetting[0];
ep = &iface->endpoint[0].desc; ep = &iface->endpoint[0].desc;
if (!usb_endpoint_is_int_in(ep)) { if (!ep || !usb_endpoint_is_int_in(ep)) {
rv = -EINVAL; rv = -EINVAL;
goto err; goto err;
} }
......
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