Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -652,7 +652,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)

	iface = &intf->altsetting[0];
	ep = &iface->endpoint[0].desc;
	if (!usb_endpoint_is_int_in(ep)) {
	if (!ep || !usb_endpoint_is_int_in(ep)) {
		rv = -EINVAL;
		goto err;
	}