linux-stable/drivers/i2c
Pavel Skripkin 9e4a3f47ef i2c: validate user data in compat ioctl
[ Upstream commit bb436283e2 ]

Wrong user data may cause warning in i2c_transfer(), ex: zero msgs.
Userspace should not be able to trigger warnings, so this patch adds
validation checks for user data in compact ioctl to prevent reported
warnings

Reported-and-tested-by: syzbot+e417648b303855b91d8a@syzkaller.appspotmail.com
Fixes: 7d5cb45655 ("i2c compat ioctls: move to ->compat_ioctl()")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-05 12:37:45 +01:00
..
algos i2c: algo: pca: Reapply i2c bus settings after reset 2020-09-23 12:40:38 +02:00
busses i2c: rk3x: Handle a spurious start completion interrupt flag 2021-12-17 10:12:23 +01:00
muxes i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()' 2020-05-27 17:46:18 +02:00
i2c-boardinfo.c
i2c-core-acpi.c i2c: acpi: fix resource leak in reconfiguration device addition 2021-10-13 10:08:20 +02:00
i2c-core-base.c i2c: core: Disable client irq on reboot/shutdown 2021-07-20 16:10:46 +02:00
i2c-core-of.c
i2c-core-slave.c i2c: slave: add sanity check when unregistering 2020-08-11 15:33:37 +02:00
i2c-core-smbus.c i2c: core: check returned size of emulated smbus block read 2020-06-30 15:37:02 -04:00
i2c-core.h
i2c-dev.c i2c: validate user data in compat ioctl 2022-01-05 12:37:45 +01:00
i2c-mux.c
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c
Kconfig
Makefile