linux-stable/drivers/media/usb
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
..
airspy media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: au0828: fix a NULL vs IS_ERR() check 2021-06-02 13:30:28 +02:00
b2c2 media: flexcop: avoid -Wempty-body warning 2021-04-09 13:05:01 +02:00
cpia2 media: usb: cpia2: Fixed Coding Style issues 2021-06-17 10:22:33 +02:00
cx231xx media: cx231xx/cx231xx.h: Remove repeated struct declaration 2021-04-06 16:10:19 +02:00
dvb-usb media: cinergyt2: make properties const 2021-06-08 15:53:19 +02:00
dvb-usb-v2 media: rtl28xxu: fix zero-length control request 2021-07-30 12:59:18 +02:00
em28xx media: drivers/media/usb/em28xx/em28xx-cards.c : fix typo issues 2021-06-02 14:05:26 +02:00
go7007 media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
gspca media: gspca: ov519: replace RIGHT SINGLE QUOTATION MARK 2021-06-04 08:08:40 +02:00
hackrf media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
hdpvr media: usb: hdpvr: convert to use i2c_new_client_device() 2020-04-14 11:31:48 +02:00
msi2500 media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
pvrusb2 media: pvrusb2: fix warning in pvr2_i2c_core_done 2021-05-19 09:51:39 +02:00
pwc treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
s2255 media: s2255drv: remove redundant assignment to variable field 2021-05-19 09:51:39 +02:00
siano media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
stk1160 media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
stkwebcam media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
tm6000 module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttusb-budget media: dvb-ttusb-budget: cleanup printk logic 2020-09-03 11:15:47 +02:00
ttusb-dec media: ttusb-dec: cleanup an error handling logic 2021-06-17 09:27:34 +02:00
usbtv media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
uvc media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K 2021-06-11 11:23:56 +02:00
zr364xx media: zr364xx: fix memory leak in zr364xx_start_readpipe 2021-06-02 13:35:15 +02:00
Kconfig media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
Makefile media: move CEC USB drivers to a separate directory 2020-04-15 12:06:40 +02:00