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

Commit 403dff4e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: cdc-acm: check for valid interfaces

We need to check that we have both a valid data and control inteface for both
types of headers (union and not union.)

References: https://bugzilla.kernel.org/show_bug.cgi?id=83551


Reported-by: default avatarSimon Schubert <2+kernel@0x2c.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d908f847
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1195,11 +1195,12 @@ static int acm_probe(struct usb_interface *intf,
	} else {
		control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0);
		data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = union_header->bSlaveInterface0));
	}

	if (!control_interface || !data_interface) {
		dev_dbg(&intf->dev, "no interfaces\n");
		return -ENODEV;
	}
	}

	if (data_interface_num != call_interface_num)
		dev_dbg(&intf->dev, "Separate call control interface. That is not fully supported.\n");