From: Tristan Madani <tristmd@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>
Cc: linux-media@vger.kernel.org, stable@vger.kernel.org,
Tristan Madani <tristan@talencesecurity.com>
Subject: [PATCH 3/3] media: au0828: require minimum isochronous packet length
Date: Sun, 18 Oct 2026 22:54:37 +0000 [thread overview]
Message-ID: <20261018225437.2655311-4-tristmd@gmail.com> (raw)
In-Reply-To: <20261018225437.2655311-1-tristmd@gmail.com>
From: Tristan Madani <tristan@talencesecurity.com>
au0828_isoc_copy() subtracts 4 from actual_length to skip the
packet header: len = urb->iso_frame_desc[i].actual_length - 4.
The existing check rejects only actual_length <= 0, so a length
of 1-3 causes len to wrap negative. The wrapped value is then
passed to the copy helpers as an unsigned size.
Raise the minimum from > 0 to >= 5 (4-byte header plus at least
one byte of payload).
Fixes: 8b2f07952345 ("V4L/DVB (11066): au0828: add support for analog functionality in bridge")
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
drivers/media/usb/au0828/au0828-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 3c53105f3d2b3..6cc99d1a2fbce 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -530,7 +530,7 @@ static inline int au0828_isoc_copy(struct au0828_dev *dev, struct urb *urb)
continue;
}
- if (urb->iso_frame_desc[i].actual_length <= 0)
+ if (urb->iso_frame_desc[i].actual_length < 5)
continue;
if (urb->iso_frame_desc[i].actual_length >
--
2.47.3
prev parent reply other threads:[~2026-10-18 22:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 22:54 [PATCH 0/3] media: USB: validate transfer lengths in URB callbacks Tristan Madani
2026-10-18 22:54 ` [PATCH 1/3] media: cx231xx: validate minimum transfer length in video handlers Tristan Madani
2026-10-18 22:54 ` [PATCH 2/3] media: cx231xx: require minimum VBI transfer length Tristan Madani
2026-10-18 22:54 ` Tristan Madani [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=20261018225437.2655311-4-tristmd@gmail.com \
--to=tristmd@gmail.com \
--cc=hverkuil@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tristan@talencesecurity.com \
/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