]> 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)
commit6dd09c68975012dfea5cb48a82cd4421d682215f
treea3c458b7802e7f2ba058efddde1f10bb17f198b5
parent3cc306579736e8f9e59ebd4c2b09e1a2776444da
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: 87845e6c26e1 ("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