From: Ricardo Ribalda <ribalda@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Ricardo Ribalda <ribalda@chromium.org>,
stable@vger.kernel.org
Subject: [PATCH v2 0/2] media: uvcvideo: Do not read beyond the uvc_status urb
Date: Fri, 02 Oct 2026 11:21:09 +0000 [thread overview]
Message-ID: <20261002-uvc-status-11-v2-0-a98a135df0eb@chromium.org> (raw)
When we receive an interrupt status with a control change, verify that
the urb has enough data before we read it.
While fixing it we figured out that one of the mappings was using an
invalid size. It was working fine because it used a custom map function,
but now we rely on that value.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v2:
- Use wMaxPacketSize for the urb size (Thanks Laurent).
- New patch to set the proper size of V4L2_CID_ZOOM_CONTINUOUS.
- Link to v1: https://lore.kernel.org/r/20260813-uvc-status-11-v1-1-2cf43e9590b0@chromium.org
---
Ricardo Ribalda (2):
media: uvcvideo: Introduce scattered field for uvc_control_mapping
media: uvcvideo: Do not read beyond the uvc_status_control memory
drivers/media/usb/uvc/uvc_ctrl.c | 18 +++++++++++++-----
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/usb/uvc/uvc_status.c | 18 +++++++++++++-----
drivers/media/usb/uvc/uvcvideo.h | 15 ++++++++++++---
4 files changed, 39 insertions(+), 14 deletions(-)
---
base-commit: 7fa44c2c123c17c4a3856ffac5e384409267cced
change-id: 20260813-uvc-status-11-99b9e27a8ea9
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
next reply other threads:[~2026-10-02 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 11:21 Ricardo Ribalda [this message]
2026-10-02 11:21 ` [PATCH v2 1/2] media: uvcvideo: Introduce scattered field for uvc_control_mapping Ricardo Ribalda
2026-10-02 11:21 ` [PATCH v2 2/2] media: uvcvideo: Do not read beyond the uvc_status_control memory Ricardo Ribalda
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=20261002-uvc-status-11-v2-0-a98a135df0eb@chromium.org \
--to=ribalda@chromium.org \
--cc=guennadi.liakhovetski@intel.com \
--cc=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®