OpenCloudOS-Kernel/drivers/media/rc
Takashi Iwai 2a493a34bd media: imon: fix access to invalid resource for the second interface
[ Upstream commit a1766a4fd83befa0b34d932d532e7ebb7fab1fa7 ]

imon driver probes two USB interfaces, and at the probe of the second
interface, the driver assumes blindly that the first interface got
bound with the same imon driver.  It's usually true, but it's still
possible that the first interface is bound with another driver via a
malformed descriptor.  Then it may lead to a memory corruption, as
spotted by syzkaller; imon driver accesses the data from drvdata as
struct imon_context object although it's a completely different one
that was assigned by another driver.

This patch adds a sanity check -- whether the first interface is
really bound with the imon driver or not -- for avoiding the problem
above at the probe time.

Reported-by: syzbot+59875ffef5cb9c9b29e9@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000a838aa0603cc74d6@google.com/
Tested-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20230922005152.163640-1-ricardo@marliere.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:47 +00:00
..
img-ir media: img-ir-core: Convert to platform remove callback returning void 2023-04-11 16:59:20 +02:00
keymaps media: rc: add Beelink Mini MXIII keymap 2023-03-19 22:21:54 +01:00
Kconfig media: rc: meson-ir: support MMIO regmaps to access registers 2023-07-14 09:19:17 +02:00
Makefile
ati_remote.c
bpf-lirc.c
ene_ir.c media: rc: Fix use-after-free bugs caused by ene_tx_irqsim() 2023-02-08 07:49:22 +01:00
ene_ir.h
fintek-cir.c
fintek-cir.h
gpio-ir-recv.c media: rc: gpio-ir-recv: drop of_match_ptr for ID table 2023-07-14 12:32:26 +02:00
gpio-ir-tx.c media: rc: gpio-ir-tx: drop of_match_ptr for ID table 2023-07-14 12:32:27 +02:00
igorplugusb.c
iguanair.c
imon.c media: imon: fix access to invalid resource for the second interface 2023-11-28 17:19:47 +00:00
imon_raw.c
ir-hix5hd2.c media: ir-hix5hd2: Convert to platform remove callback returning void 2023-04-11 16:59:20 +02:00
ir-imon-decoder.c
ir-jvc-decoder.c
ir-mce_kbd-decoder.c
ir-nec-decoder.c
ir-rc5-decoder.c
ir-rc6-decoder.c
ir-rcmm-decoder.c
ir-rx51.c media: rc: ir-rx51: drop of_match_ptr for ID table 2023-07-14 12:32:29 +02:00
ir-sanyo-decoder.c
ir-sharp-decoder.c
ir-sony-decoder.c
ir-spi.c media: ir-spi: silence no spi_device_id warnings 2022-11-25 08:00:22 +00:00
ir-xmp-decoder.c
ir_toy.c
ite-cir.c
ite-cir.h
lirc_dev.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
mceusb.c media: mceusb: set timeout to at least timeout provided 2022-09-24 07:50:42 +02:00
meson-ir-tx.c media: meson-ir-tx: Convert to platform remove callback returning void 2023-04-11 16:59:20 +02:00
meson-ir.c media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
mtk-cir.c media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
nuvoton-cir.c
nuvoton-cir.h
pwm-ir-tx.c media: rc: Drop obsolete dependencies on COMPILE_TEST 2023-01-22 08:36:35 +01:00
rc-core-priv.h
rc-ir-raw.c
rc-loopback.c
rc-main.c driver core: make struct device_type.uevent() take a const * 2023-01-27 13:45:36 +01:00
redrat3.c
serial_ir.c
st_rc.c media: st_rc: Convert to platform remove callback returning void 2023-04-11 16:59:21 +02:00
streamzap.c
sunxi-cir.c media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
ttusbir.c
winbond-cir.c
xbox_remote.c