mbox series

[0/4] USB: cdc-acm: handle broken union descriptors

Message ID 20200921113525.32187-1-johan@kernel.org
Headers show
Series USB: cdc-acm: handle broken union descriptors | expand

Message

Johan Hovold Sept. 21, 2020, 11:35 a.m. UTC
This series adds support for handle broken union descriptors by falling
back to "combined-interface" probing.

The first patch drops some bogus altsetting sanity checks which would
otherwise have had to be needlessly reproduced for consistency. The
final patch drops the driver specific data class define in favour of the
common one.

I'm not adding a CC stable tag since this is technically a new feature
even if it enables a class of radio-scanner devices. I guess we can
consider backporting once this gets some more testing though.

Note that I also included a fourth RFC patch implementing an alternative
approach which could replace the second patch entirely. Depending on the
feedback on that, there may be a v2 of the series.

Johan


Johan Hovold (4):
  Revert "cdc-acm: hardening against malicious devices"
  USB: cdc-acm: handle broken union descriptors
  USB: cdc-acm: use common data-class define
  USB: cdc-acm: clean up handling of quirky devices

 drivers/usb/class/cdc-acm.c | 43 +++++++++++--------------------------
 drivers/usb/class/cdc-acm.h | 13 +++++------
 2 files changed, 18 insertions(+), 38 deletions(-)

Comments

Oliver Neukum Sept. 21, 2020, 12:45 p.m. UTC | #1
Am Montag, den 21.09.2020, 14:15 +0200 schrieb Johan Hovold:
> On Mon, Sep 21, 2020 at 01:53:52PM +0200, Oliver Neukum wrote:
> > Am Montag, den 21.09.2020, 13:35 +0200 schrieb Johan Hovold:
> > > Instead of falling back to "combined-interface" probing when detecting
> > > broken union and call-management descriptors, assume all interfaces with
> > > three endpoints are of "combined-interface" type.
> > 
> > Hi,
> > 
> > this just ignores a union header. I am afraid that is not correct.
> > Could you move it into the !union_header clause?
> 
> And probe for a combined interface before falling back to the management
> descriptor then? Along the lines of


Yes, exactly.

	Regards
		Oliver