linux/drivers/media
Johan Hovold 76f22c93b2 media: rtl28xxu: fix zero-length control request
The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.

Control transfers without a data stage are treated as OUT requests by
the USB stack and should be using usb_sndctrlpipe(). Failing to do so
will now trigger a warning.

The driver uses a zero-length i2c-read request for type detection so
update the control-request code to use usb_sndctrlpipe() in this case.

Note that actually trying to read the i2c register in question does not
work as the register might not exist (e.g. depending on the demodulator)
as reported by Eero Lehtinen <debiangamer2@gmail.com>.

Reported-by: syzbot+faf11bbadc5a372564da@syzkaller.appspotmail.com
Reported-by: Eero Lehtinen <debiangamer2@gmail.com>
Tested-by: Eero Lehtinen <debiangamer2@gmail.com>
Fixes: d0f232e823 ("[media] rtl28xxu: add heuristic to detect chip type")
Cc: stable@vger.kernel.org      # 4.0
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-07-30 12:59:18 +02:00
..
cec media: s5p: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:33 +02:00
common media: siano: fix device register error path 2021-06-17 09:27:08 +02:00
dvb-core media: dvb-core: frontend: make GET/SET safer 2021-06-17 09:29:11 +02:00
dvb-frontends media: mxl692: make a const array static, makes object smaller 2021-06-08 15:50:38 +02:00
firewire module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
i2c media: i2c: rdacm20: Re-work ov10635 reset 2021-06-17 12:08:55 +02:00
mc media: Fix Media Controller API config checks 2021-06-24 14:26:00 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: pci: cx88: switch from 'pci_' to 'dma_' API 2021-06-17 10:24:41 +02:00
platform media: s5p-mfc: Fix display delay control creation 2021-06-28 15:17:42 +02:00
radio media: radio: si4713: constify static struct v4l2_ioctl_ops 2021-06-02 13:26:11 +02:00
rc media: imon: use DEVICE_ATTR_RW() helper macro 2021-06-08 15:57:51 +02:00
spi media: cxd2880-spi: Fix some error messages 2021-06-08 15:51:35 +02:00
test-drivers media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tuners media: m88rs6000t: avoid potential out-of-bounds reads on arrays 2021-03-22 17:41:39 +01:00
usb media: rtl28xxu: fix zero-length control request 2021-07-30 12:59:18 +02:00
v4l2-core media: v4l2-event: Modified variable type 'unsigned' to 'unsigned int' 2021-06-17 10:22:59 +02:00
Kconfig media: Correct 'so' 2021-03-22 11:52:09 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00