From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
To: linux-media@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Ricardo Ribalda <ribalda@chromium.org>,
kernel-dev@igalia.com,
Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Subject: [PATCH v3 0/1] uvcvideo: require spec compliance to avoid bugs
Date: Fri, 13 Sep 2024 15:06:00 -0300 [thread overview]
Message-ID: <20240913180601.1400596-1-cascardo@igalia.com> (raw)
Some syzkaller reproducers have triggered cases where the devices would not
comply with the UVC specification and warnings would result.
These cases can be simply fixed by preventing the allocation of entities
with duplicate IDs or zero IDs.
v2:
Squash the two commits into one.
Version 1.1 of the spec already mentioned the restrictions on section 3.7.2.
Renamed uvc_alloc_entity to uvc_alloc_new_entity.
Print error message.
Return PTR_ERR values.
Fix checkpatch warnings.
I used section 3.7.2 excerpt from the spec as it is not specific to Output
units/terminals and it also mentions that zero IDs are undefined.
v3:
Check for 0 ID before checking for duplicate ID as originally.
Fix checkpatch format.
Thadeu Lima de Souza Cascardo (1):
media: uvcvideo: require entities to have a non-zero unique ID
drivers/media/usb/uvc/uvc_driver.c | 70 ++++++++++++++++++------------
1 file changed, 43 insertions(+), 27 deletions(-)
--
2.34.1
next reply other threads:[~2024-09-13 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 18:06 Thadeu Lima de Souza Cascardo [this message]
2024-09-13 18:06 ` [PATCH v3 1/1] media: uvcvideo: require entities to have a non-zero unique ID Thadeu Lima de Souza Cascardo
2024-09-25 19:45 ` Laurent Pinchart
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=20240913180601.1400596-1-cascardo@igalia.com \
--to=cascardo@igalia.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel-dev@igalia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.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 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.