From: "tip-bot2 for Anant Thazhemadam" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com,
Anant Thazhemadam <anant.thazhemadam@gmail.com>,
stable <stable@vger.kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: perf/urgent] staging: comedi: check validity of wMaxPacketSize of usb endpoints found
Date: Mon, 19 Oct 2020 17:02:44 -0000 [thread overview]
Message-ID: <160312696435.7002.11176979799560597940.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201010082933.5417-1-anant.thazhemadam@gmail.com>
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 38df15cb4ce149ce3648d2a9ccc0140afa71fc02
Gitweb: https://git.kernel.org/tip/38df15cb4ce149ce3648d2a9ccc0140afa71fc02
Author: Anant Thazhemadam <anant.thazhemadam@gmail.com>
AuthorDate: Sat, 10 Oct 2020 13:59:32 +05:30
Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CommitterDate: Sat, 17 Oct 2020 08:31:21 +02:00
staging: comedi: check validity of wMaxPacketSize of usb endpoints found
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@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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/comedi/drivers/vmk80xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 65dc6c5..7956abc 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -667,6 +667,9 @@ static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
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;
}
prev parent reply other threads:[~2020-10-19 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 8:29 [PATCH v3] staging: comedi: check validity of wMaxPacketSize of usb endpoints found Anant Thazhemadam
2020-10-10 9:35 ` Greg Kroah-Hartman
2020-10-10 10:37 ` Greg Kroah-Hartman
2020-10-19 17:02 ` tip-bot2 for Anant Thazhemadam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160312696435.7002.11176979799560597940.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=anant.thazhemadam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).