WSL2-Linux-Kernel/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 platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open 2021-03-30 18:25:22 +02:00
Kconfig platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config 2020-09-04 09:30:04 +02:00
Makefile platform: chrome: Split trace include file 2022-04-08 14:24:07 +02:00
chromeos_laptop.c platform/chrome: fix double-free in chromeos_laptop_prepare() 2022-10-26 12:34:52 +02:00
chromeos_pstore.c chrome platform changes for 5.8 2020-06-04 10:54:45 -07:00
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 platform/chrome: cros_ec: Call interrupt bottom half in ISH or RPMSG mode 2021-01-22 08:50:27 +01:00
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 platform/chrome: cros_ec_debugfs: detach log reader wq from devm 2022-05-25 09:57:26 +02:00
cros_ec_i2c.c platform/chrome: cros_ec_i2c: Appease the kernel-doc deity 2020-05-04 14:01:45 -07:00
cros_ec_ishtp.c HID: intel-ish-hid: Make remove callback return void 2021-03-08 17:16:03 +01:00
cros_ec_lightbar.c platform/chrome: Constify static attribute_group structs 2021-01-20 16:19:17 +01:00
cros_ec_lpc.c
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock 2021-04-21 10:00:30 +02:00
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 platform/chrome: cros_ec: Call interrupt bottom half in ISH or RPMSG mode 2021-01-22 08:50:27 +01:00
cros_ec_sensorhub.c
cros_ec_sensorhub_ring.c platform: chrome: Split trace include file 2022-04-08 14:24:07 +02:00
cros_ec_sensorhub_trace.h platform: chrome: Split trace include file 2022-04-08 14:24:07 +02:00
cros_ec_spi.c platform/chrome: cros_ec_spi: Drop bits_per_word assignment 2020-12-09 16:52:09 +00:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot. 2021-01-20 16:19:17 +01:00
cros_ec_trace.c platform/chrome: cros_ec: Add command for regulator control. 2020-06-15 22:40:14 +01:00
cros_ec_trace.h platform: chrome: Split trace include file 2022-04-08 14:24:07 +02:00
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 platform/chrome: Constify static attribute_group structs 2021-01-20 16:19:17 +01:00
cros_kbd_led_backlight.c
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str() 2020-05-04 14:02:01 -07:00
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