This is a note to let you know that I've just added the patch titled staging: comedi: check validity of wMaxPacketSize of usb endpoints found to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: staging-comedi-check-validity-of-wmaxpacketsize-of-usb-endpoints-found.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e1f13c879a7c21bd207dc6242455e8e3a1e88b40 Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam <anant.thazhemadam@xxxxxxxxx> Date: Sat, 10 Oct 2020 13:59:32 +0530 Subject: staging: comedi: check validity of wMaxPacketSize of usb endpoints found From: Anant Thazhemadam <anant.thazhemadam@xxxxxxxxx> commit e1f13c879a7c21bd207dc6242455e8e3a1e88b40 upstream. 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@xxxxxxxxxxxxxxxxxxxxxxxxx Tested-by: syzbot+009f546aa1370056b1c2@xxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Anant Thazhemadam <anant.thazhemadam@xxxxxxxxx> Cc: stable <stable@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20201010082933.5417-1-anant.thazhemadam@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/vmk80xx.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/staging/comedi/drivers/vmk80xx.c +++ b/drivers/staging/comedi/drivers/vmk80xx.c @@ -676,6 +676,9 @@ static int vmk80xx_find_usb_endpoints(st if (!devpriv->ep_rx || !devpriv->ep_tx) return -ENODEV; + if (!usb_endpoint_maxp(devpriv->ep_rx) || !usb_endpoint_maxp(devpriv->ep_tx)) + return -EINVAL; + return 0; } Patches currently in stable-queue which might be from anant.thazhemadam@xxxxxxxxx are queue-4.9/staging-comedi-check-validity-of-wmaxpacketsize-of-usb-endpoints-found.patch