tmp_suning_uos_patched/drivers/media
Johan Hovold 556e7f204d media: rtl28xxu: fix zero-length control request
commit 76f22c93b209c811bd489950f17f8839adb31901 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-12 13:22:14 +02:00
..
cec media: s5p_cec: decrement usage count if disabled 2021-07-14 16:56:02 +02: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: Add check on sp8870_readreg return 2021-06-03 09:00:42 +02:00
firewire media: firewire: fix memory leak 2020-09-27 11:29:45 +02:00
i2c media: subdev: disallow ioctl for saa6588/davinci 2021-07-19 09:45:02 +02:00
mc media: Fix Media Controller API config checks 2021-07-14 16:55:56 +02:00
mmc
pci media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf() 2021-07-28 14:35:45 +02:00
platform media: subdev: disallow ioctl for saa6588/davinci 2021-07-19 09:45:02 +02:00
radio Linux 5.9-rc4 2020-09-07 16:13:06 +02:00
rc media, bpf: Do not copy more entries than user space requested 2021-07-19 09:44:53 +02:00
spi
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: rtl28xxu: fix zero-length control request 2021-08-12 13:22:14 +02:00
v4l2-core media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev 2021-07-14 16:56:11 +02:00
Kconfig
Makefile