linux/drivers/media
Johan Hovold 93c4506f9f media: uvcvideo: fix division by zero at stream start
commit 8aa637bf6d upstream.

Add the missing bulk-endpoint max-packet sanity check to
uvc_video_start_transfer() to avoid division by zero in
uvc_alloc_urb_buffers() in case a malicious device has broken
descriptors (or when doing descriptor fuzz testing).

Note that USB core will reject URBs submitted for endpoints with zero
wMaxPacketSize but that drivers doing packet-size calculations still
need to handle this (cf. commit 2548288b4f ("USB: Fix: Don't skip
endpoint descriptors with maxpacket=0")).

Fixes: c0efd23292 ("V4L/DVB (8145a): USB Video Class driver")
Cc: stable@vger.kernel.org      # 2.6.26
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-20 09:17:50 +01:00
..
cec media: cec: copy sequence field for the reply 2021-12-01 09:19:00 +01:00
common media: videobuf2-core: dequeue if start_streaming fails 2021-08-12 13:22:04 +02:00
dvb-core media: dvb_net: avoid speculation from net slot 2021-07-14 16:55:54 +02:00
dvb-frontends media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable() 2021-11-18 14:04:06 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:10:09 +01:00
i2c media: TDA1997x: handle short reads of hdmi info frame. 2021-11-18 14:04:04 +01:00
mc media: Fix Media Controller API config checks 2021-07-14 16:55:56 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: cx23885: Fix snd_card_free call on null card pointer 2021-11-18 14:04:05 +01:00
platform media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()' 2021-11-18 14:04:05 +01:00
radio media: si470x: Avoid card name truncation 2021-11-18 14:04:05 +01:00
rc media: ir_toy: assignment to be16 should be of correct type 2021-11-18 14:04:08 +01:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 14:04:04 +01:00
test-drivers media: vivid: fix assignment of dev->fbuf_out_flags 2021-05-14 09:50:22 +02:00
tuners media: m88rs6000t: avoid potential out-of-bounds reads on arrays 2021-05-14 09:50:23 +02:00
usb media: uvcvideo: fix division by zero at stream start 2022-01-20 09:17:50 +01:00
v4l2-core media: v4l2-ioctl: S_CTRL output the right value 2021-11-18 14:04:04 +01:00
Kconfig
Makefile