mbox series

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

Message ID 20200921135951.24045-1-johan@kernel.org (mailing list archive)
Headers show
Series USB: cdc-acm: handle broken union descriptors | expand

Message

Johan Hovold Sept. 21, 2020, 1:59 p.m. UTC
This series adds support for handling 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
third patch drops the driver specific data class define in favour of the
common one. The last one, cleans up the no-union-descriptor handling by
probing for a "combined-interface" before falling back to the
call-management descriptor.

Note that I changed my mind on the stable tag; we can't be overly
paranoid about a theoretical risk of breaking some quirky devices. And
if we do, we still want to know about it, right?

Daniel, would you mind giving these a spin as well?

Johan

v2
 - add stable tag to 2/2 as it enables a new class of devices
 - demote a broken-union warning to dev_dbg
 - replace the fourth RFC patch with a clean up of the
   no-union-descriptor case only


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 no-union-descriptor handling

 drivers/usb/class/cdc-acm.c | 55 ++++++++++++++++---------------------
 drivers/usb/class/cdc-acm.h | 13 ++++-----
 2 files changed, 29 insertions(+), 39 deletions(-)

Comments

f1rmb.daniel@gmail.com Sept. 21, 2020, 2:21 p.m. UTC | #1
Hi Johan,


   Yes, sure. Patching....


Cheers.
---
Daniel
f1rmb.daniel@gmail.com Sept. 21, 2020, 4:19 p.m. UTC | #2
Hi Johan, Oliver,

   I just compiled and tested, everything still works.


Cheers.
---
Daniel
Johan Hovold Sept. 22, 2020, 7:08 a.m. UTC | #3
On Mon, Sep 21, 2020 at 06:19:12PM +0200, <Daniel Caujolle-Bert> wrote:
> Hi Johan, Oliver,
> 
>    I just compiled and tested, everything still works.

Thanks for testing, Daniel.

If you want to you can reply to the second patch with a Tested-by tag so
that it gets added by Greg's tooling (or reply to the cover letter if
you want to have that tag added to all the patches in the series).

Johan
f1rmb.daniel@gmail.com Sept. 22, 2020, 9:56 a.m. UTC | #4
Hi Johan,

   Okay, I replied to the second patch, hope I didn't make any mistake.


Cheers.
---
Daniel
Johan Hovold Sept. 22, 2020, 10:07 a.m. UTC | #5
On Tue, Sep 22, 2020 at 11:56:02AM +0200, <Daniel Caujolle-Bert> wrote:
> Hi Johan,
> 
>    Okay, I replied to the second patch, hope I didn't make any mistake.

Looks good. Thanks again!

Johan
Oliver Neukum Sept. 22, 2020, 12:10 p.m. UTC | #6
Am Montag, den 21.09.2020, 15:59 +0200 schrieb Johan Hovold:
> This series adds support for handling 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
> third patch drops the driver specific data class define in favour of the
> common one. The last one, cleans up the no-union-descriptor handling by
> probing for a "combined-interface" before falling back to the
> call-management descriptor.
> 
> Note that I changed my mind on the stable tag; we can't be overly
> paranoid about a theoretical risk of breaking some quirky devices. And
> if we do, we still want to know about it, right?

Acked-by: Oliver Neukum <oneukum@suse.com>