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 0/3] media: USB: validate transfer lengths in URB callbacks
Date: Sun, 18 Oct 2026 22:54:34 +0000 [thread overview]
Message-ID: <20261018225437.2655311-1-tristmd@gmail.com> (raw)
From: Tristan Madani <tristan@talencesecurity.com>
Several media USB drivers process URB transfer buffers at fixed
offsets without checking actual_length or iso_frame_desc
actual_length. When a device delivers a short transfer, the
arithmetic on the length value wraps and the driver reads or copies
from an unintended memory offset.
This series adds minimum length checks to three drivers:
- cx231xx video: isoc and bulk handlers need buffer_size >= 4
before computing p_buffer + buffer_size - 4
- cx231xx VBI: same pattern, raise threshold from > 0 to >= 4
- au0828: isoc handler subtracts 4-byte header, raise threshold
from > 0 to >= 5
Tristan Madani (3):
media: cx231xx: validate minimum transfer length in video handlers
media: cx231xx: require minimum VBI transfer length
media: au0828: require minimum isochronous packet length
drivers/media/usb/au0828/au0828-video.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-video.c | 6 ++++++
3 files changed, 8 insertions(+), 2 deletions(-)
--
2.39.5
next 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 Tristan Madani [this message]
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 ` [PATCH 3/3] media: au0828: require minimum isochronous packet length Tristan Madani
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-1-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.