Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v3 0/1] uvcvideo: require spec compliance to avoid bugs
@ 2024-09-13 18:06 Thadeu Lima de Souza Cascardo
  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
  0 siblings, 1 reply; 26+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2024-09-13 18:06 UTC (permalink / raw)
  To: linux-media
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Hans Verkuil,
	Ricardo Ribalda, kernel-dev, Thadeu Lima de Souza Cascardo

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


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

end of thread, other threads:[~2025-01-31 16:59 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CADBf=5nJVddk-yPVw3T5GH9JEPOxnO8McPJHaxtnPBvLCnp42Q@mail.gmail.com>
2025-01-06  7:27 ` [PATCH v3 1/1] media: uvcvideo: require entities to have a non-zero unique ID Laurent Pinchart
2025-01-06 10:55 ` Thadeu Lima de Souza Cascardo
     [not found]   ` <CADBf=5nS8_cQvG3mRnXe_MGYmFMh=Myf_eptPqN9hgNMu73Wjg@mail.gmail.com>
2025-01-08 15:32     ` Thadeu Lima de Souza Cascardo
2025-01-08 15:36       ` Laurent Pinchart
2025-01-08 15:56         ` Thadeu Lima de Souza Cascardo
2025-01-08 22:14           ` Tomasz Sikora
2025-01-09 10:47             ` Thadeu Lima de Souza Cascardo
2025-01-13 18:50               ` Laurent Pinchart
2025-01-14  3:01                 ` Ricardo Ribalda
2025-01-14 12:41                   ` Thadeu Lima de Souza Cascardo
2025-01-14 15:20                     ` Ricardo Ribalda
2025-01-14 17:26                       ` Thadeu Lima de Souza Cascardo
2025-01-14 20:00                         ` [PATCH] Revert "media: uvcvideo: Require entities to have a non-zero unique ID" Thadeu Lima de Souza Cascardo
2025-01-20 11:52                           ` Ricardo Ribalda
2025-01-31 10:04                             ` Ricardo Ribalda
2025-01-31 11:12                               ` Hans de Goede
2025-01-31 11:17                                 ` Ricardo Ribalda
2025-01-31 14:06                                   ` Mauro Carvalho Chehab
2025-01-31 14:30                                     ` Hans Verkuil
2025-01-31 16:38                                     ` Hans de Goede
2025-01-31 16:57                                       ` Laurent Pinchart
2025-01-31 16:35                           ` Hans de Goede
2025-01-31 16:59                           ` Laurent Pinchart
2025-01-14 12:37                 ` [PATCH v3 1/1] media: uvcvideo: require entities to have a non-zero unique ID Thadeu Lima de Souza Cascardo
2024-09-13 18:06 [PATCH v3 0/1] uvcvideo: require spec compliance to avoid bugs Thadeu Lima de Souza Cascardo
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

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