Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] media: pci: Fix invalid access to file *
@ 2025-08-18 12:40 Jacopo Mondi
  2025-08-18 12:40 ` [PATCH 1/2] media: cx18: " Jacopo Mondi
  2025-08-18 12:40 ` [PATCH 2/2] media: ivtv: " Jacopo Mondi
  0 siblings, 2 replies; 5+ messages in thread
From: Jacopo Mondi @ 2025-08-18 12:40 UTC (permalink / raw)
  To: Andy Walls, Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart
  Cc: Dan Carpenter, stable, linux-media, linux-kernel, Jacopo Mondi

Since commits
7b9eb53e8591 ("media: cx18: Access v4l2_fh from file")
9ba9d11544f9 ("media: ivtv: Access v4l2_fh from file")

All the ioctl handlers access their private data structures
from file *

The ivtv and cx18 drivers call the ioctl handlers from their
DVB layer without a valid file *, causing invalid memory access.

The issue has been reported by smatch in
"[bug report] media: cx18: Access v4l2_fh from file"

Fix this by providing wrappers for the ioctl handlers to be
used by the DVB layer that do not require a valid file *.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
Jacopo Mondi (2):
      media: cx18: Fix invalid access to file *
      media: ivtv: Fix invalid access to file *

 drivers/media/pci/cx18/cx18-driver.c |  6 +++---
 drivers/media/pci/cx18/cx18-ioctl.c  | 26 ++++++++++++++++++++------
 drivers/media/pci/cx18/cx18-ioctl.h  |  8 +++++---
 drivers/media/pci/ivtv/ivtv-driver.c |  4 ++--
 drivers/media/pci/ivtv/ivtv-ioctl.c  | 22 +++++++++++++++++-----
 drivers/media/pci/ivtv/ivtv-ioctl.h  |  6 ++++--
 6 files changed, 51 insertions(+), 21 deletions(-)
---
base-commit: a75b8d198c55e9eb5feb6f6e155496305caba2dc
change-id: 20250818-cx18-v4l2-fh-7eaa6199fdde

Best regards,
-- 
Jacopo Mondi <jacopo.mondi@ideasonboard.com>


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

end of thread, other threads:[~2025-08-18 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 12:40 [PATCH 0/2] media: pci: Fix invalid access to file * Jacopo Mondi
2025-08-18 12:40 ` [PATCH 1/2] media: cx18: " Jacopo Mondi
2025-08-18 12:42   ` kernel test robot
2025-08-18 13:11   ` Laurent Pinchart
2025-08-18 12:40 ` [PATCH 2/2] media: ivtv: " Jacopo Mondi

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