linux/drivers/iio/common
Yiyuan Guo 366563c14f iio: cros_ec: Fix the allocation size for cros_ec_command
commit 8a4629055e upstream.

The struct cros_ec_command contains several integer fields and a
trailing array. An allocation size neglecting the integer fields can
lead to buffer overrun.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Yiyuan Guo <yguoaz@gmail.com>
Fixes: 974e6f02e2 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.")
Link: https://lore.kernel.org/r/20230630143719.1513906-1-yguoaz@gmail.com
Cc: <Stable@vger.kerenl.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2023-08-16 18:27:24 +02:00
..
cros_ec_sensors iio: cros_ec: Fix the allocation size for cros_ec_command 2023-08-16 18:27:24 +02:00
hid-sensors iio: triggered-buffer: extend support to configure output buffers 2021-10-19 08:30:45 +01:00
ms_sensors iio:common:meas-spec: Move exports into IIO_MEAS_SPEC_SENSORS 2022-02-18 11:42:26 +00:00
scmi_sensors iio: common: scmi_sensors: use HZ macro from units.h 2022-08-28 16:57:56 +01:00
ssp_sensors iio: common: ssp: Fix alignment for DMA safety 2022-06-14 11:53:15 +01:00
st_sensors iio: st_sensors: move from strlcpy with unused retval to strscpy 2022-08-19 18:23:14 +01:00
Kconfig iio/scmi: Adding support for IIO SCMI Based Sensors 2021-03-13 16:43:04 +00:00
Makefile iio/scmi: Adding support for IIO SCMI Based Sensors 2021-03-13 16:43:04 +00:00