]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: check the informaton of the device
authorHayes Wang <hayeswang@realtek.com>
Mon, 24 May 2021 06:49:42 +0000 (14:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2021 20:15:29 +0000 (13:15 -0700)
commit751d0e1a9b32c760b8f68dbcf8c0543745ac2a20
treea3c458b7802e7f2ba058efddde1f10bb17f198b5
parente271f1376795a15e37799fe8431db4574d595316
r8152: check the informaton of the device

Verify some fields of the USB descriptor to make sure the driver
could be used by the device.

Besides, remove the check of endpoint number in rtl8152_probe().
usb_find_common_endpoints() includes it.

BugLink: https://syzkaller.appspot.com/bug?id=912c9c373656996801b4de61f1e3cb326fe940aa
Reported-by: syzbot+95afd23673f5dd295c57@syzkaller.appspotmail.com
Fixes: 87ca94975e4b ("r8152: search the configuration of vendor mode")
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c