public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] media: flexcop-usb: fix endpoint type check
@ 2022-08-22 15:10 Johan Hovold
  2022-09-20  9:00 ` Johan Hovold
  0 siblings, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2022-08-22 15:10 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, Sean Young, linux-media, linux-usb, linux-kernel,
	Johan Hovold, Oliver Neukum, stable, Dongliang Mu

Commit d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint
type") tried to add an endpoint type sanity check for the single
isochronous endpoint but instead broke the driver by checking the wrong
descriptor or random data beyond the last endpoint descriptor.

Make sure to check the right endpoint descriptor.

Fixes: d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type")
Cc: Oliver Neukum <oneukum@suse.com>
Cc: stable@vger.kernel.org	# 5.9
Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---

It's been two months and two completely ignored reminders so resending.

Can someone please pick this fix up and let me know when that has been
done?

Johan


 drivers/media/usb/b2c2/flexcop-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 7835bb0f32fc..e012b21c4fd7 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -511,7 +511,7 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
 
 	if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1)
 		return -ENODEV;
-	if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[1].desc))
+	if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[0].desc))
 		return -ENODEV;
 
 	switch (fc_usb->udev->speed) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-26  9:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 15:10 [PATCH RESEND] media: flexcop-usb: fix endpoint type check Johan Hovold
2022-09-20  9:00 ` Johan Hovold
2022-09-22  8:41   ` Greg Kroah-Hartman
2022-09-22  9:37     ` Johan Hovold
2022-09-22 10:12       ` Greg Kroah-Hartman
2022-09-22 10:39         ` Sean Young
2022-09-22 10:43           ` Greg Kroah-Hartman
2022-09-26  8:59         ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox