All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] media: USB: validate transfer lengths in URB callbacks
@ 2026-10-18 22:54 Tristan Madani
  2026-10-18 22:54 ` [PATCH 1/3] media: cx231xx: validate minimum transfer length in video handlers Tristan Madani
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tristan Madani @ 2026-10-18 22:54 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil; +Cc: linux-media, stable, Tristan Madani

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

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

end of thread, other threads:[~2026-10-18 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/3] media: au0828: require minimum isochronous packet length Tristan Madani

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.