Revert "cdc-acm: hardening against malicious devices"
This reverts commit 2ad9d544f2
.
Drop bogus sanity check; an interface in the active configuration will
always have a current altsetting assigned by USB core.
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200921135951.24045-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dbb29de70a
commit
e3be44cd43
@ -1197,9 +1197,6 @@ static int acm_probe(struct usb_interface *intf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!intf->cur_altsetting)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (!buflen) {
|
if (!buflen) {
|
||||||
if (intf->cur_altsetting->endpoint &&
|
if (intf->cur_altsetting->endpoint &&
|
||||||
intf->cur_altsetting->endpoint->extralen &&
|
intf->cur_altsetting->endpoint->extralen &&
|
||||||
@ -1253,8 +1250,6 @@ static int acm_probe(struct usb_interface *intf,
|
|||||||
dev_dbg(&intf->dev, "no interfaces\n");
|
dev_dbg(&intf->dev, "no interfaces\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
if (!data_interface->cur_altsetting || !control_interface->cur_altsetting)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
if (data_intf_num != call_intf_num)
|
if (data_intf_num != call_intf_num)
|
||||||
dev_dbg(&intf->dev, "Separate call control interface. That is not fully supported.\n");
|
dev_dbg(&intf->dev, "Separate call control interface. That is not fully supported.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user