lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 May 2022 21:05:29 +0900
From:   Hector Martin <marcan@...can.st>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Jacky Chou <jackychou@...x.com.tw>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: usb: ax88179_178a: Bind only to vendor-specific
 interface

On 05/05/2022 11.30, Jakub Kicinski wrote:
> On Mon,  2 May 2022 20:06:44 +0900 Hector Martin wrote:
>> The Anker PowerExpand USB-C to Gigabit Ethernet adapter uses this
>> chipset, but exposes CDC Ethernet configurations as well as the
>> vendor specific one. 
> 
> And we have reasons to believe all dongle vendors may have a similar
> problem?

Given this is a vendor-specific driver it seems correct to have it only
bind to vendor-specific interfaces. That shouldn't break anything as
long as nobody is implementing this interface with the wrong protocol
IDs (which seems like quite a weird thing to do and fairly unlikely).

FWIW, the one I have has the generic VID/PID, not a custom vendor one.
If you prefer I can change just that one or both of the generic ones.

>> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
>> index e2fa56b92685..7c7c2f31d9f1 100644
>> --- a/drivers/net/usb/ax88179_178a.c
>> +++ b/drivers/net/usb/ax88179_178a.c
>> @@ -1914,55 +1914,55 @@ static const struct driver_info at_umc2000sp_info = {
>>  static const struct usb_device_id products[] = {
>>  {
>>  	/* ASIX AX88179 10/100/1000 */
>> -	USB_DEVICE(0x0b95, 0x1790),
>> +	USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0),
>>  	.driver_info = (unsigned long)&ax88179_info,
>>  }, 
> 
> Should we use USB_CLASS_VENDOR_SPEC and USB_SUBCLASS_VENDOR_SPEC ?
> Maybe define a local macro wrapper for USB_DEVICE_AND.. which will
> fill those in to avoid long lines?

Sure, I'll do that!

-- 
Hector Martin (marcan@...can.st)
Public Key: https://mrcn.st/pub

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ