]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: check validity of wMaxPacketSize of usb endpoints found
authorAnant Thazhemadam <anant.thazhemadam@gmail.com>
Sat, 10 Oct 2020 08:29:32 +0000 (13:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Oct 2020 10:37:46 +0000 (12:37 +0200)
commit3faa7f5ab402fd213941cfb378663436464569d9
treea7d021c3405843c881b206028057802b1ad04c5e
parent0260152cef746f1785e6b8b7ff8c79d996f0643e
staging: comedi: check validity of wMaxPacketSize of usb endpoints found

While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if
wMaxPacketSize = 0 for the endpoints found.

Some devices have isochronous endpoints that have wMaxPacketSize = 0
(as required by the USB-2 spec).
However, since this doesn't apply here, wMaxPacketSize = 0 can be
considered to be invalid.

Reported-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com
Tested-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com
Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201010082933.5417-1-anant.thazhemadam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/vmk80xx.c