Skip to content

media: saa7164: check values from the card before using them

Maoyi Xie linux-media 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3media: saa7164: check the ring positions before using themdrivers/media/pci/saa7164/saa7164-bus.c+10 -00 replies
2/3media: saa7164: check the register access length from the firmwaredrivers/media/pci/saa7164/saa7164-api.c+6 -00 replies
3/3media: saa7164: check the video input in the firmware replydrivers/media/pci/saa7164/saa7164-api.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] media: saa7164: check values from the card before using them

A bad ring position or firmware reply from the SAA7164 card can make the driver access memory outside a buffer. The patches are independent.

Found with a CodeQL-based static analysis tool that we are developing. Each case was reproduced in a userspace harness under AddressSanitizer. Not tested on hardware. Compile-tested with W=1 on next-20261116.

I used an LLM to help write the harness and these patches.

Maoyi Xie (3):
media: saa7164: check the ring positions before using them
media: saa7164: check the register access length from the firmware
media: saa7164: check the video input in the firmware reply

 drivers/media/pci/saa7164/saa7164-api.c |  9 +++++++++
 drivers/media/pci/saa7164/saa7164-bus.c | 10 ++++++++++
 2 files changed, 19 insertions(+)
Signature · 1 line
2.34.1