linux-stable/drivers/platform/chrome
Tzung-Bi Shih ebea2e1650 platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl
[ Upstream commit b20cf3f89c ]

It is possible to peep kernel page's data by providing larger `insize`
in struct cros_ec_command[1] when invoking EC host commands.

Fix it by using zeroed memory.

[1]: https://elixir.bootlin.com/linux/v6.2/source/include/linux/platform_data/cros_ec_proto.h#L74

Fixes: eda2e30c66 ("mfd / platform: cros_ec: Miscellaneous character device to talk with the EC")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20230324010658.1082361-1-tzungbi@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-30 12:47:50 +02:00
..
wilco_ec
Kconfig
Makefile
chromeos_laptop.c platform/chrome: fix double-free in chromeos_laptop_prepare() 2022-10-26 12:34:52 +02:00
chromeos_pstore.c
chromeos_tbmc.c
cros_ec.c platform/chrome: cros_ec: Notify the PM of wake events during resume 2022-10-26 12:35:40 +02:00
cros_ec.h
cros_ec_chardev.c platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl 2023-03-30 12:47:50 +02:00
cros_ec_debugfs.c
cros_ec_i2c.c
cros_ec_ishtp.c
cros_ec_lightbar.c
cros_ec_lpc.c
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_proto.c platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure 2022-10-26 12:34:21 +02:00
cros_ec_rpmsg.c
cros_ec_sensorhub.c
cros_ec_sensorhub_ring.c
cros_ec_sensorhub_trace.h
cros_ec_spi.c
cros_ec_sysfs.c
cros_ec_trace.c
cros_ec_trace.h
cros_ec_typec.c platform/chrome: cros_ec_typec: zero out stale pointers 2022-12-31 13:14:05 +01:00
cros_ec_vbc.c
cros_kbd_led_backlight.c
cros_usbpd_logger.c
cros_usbpd_notify.c platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init() 2022-12-31 13:14:02 +01:00