milos-linux/drivers/iio/imu
Greg Kroah-Hartman 474f8928d5 iio: imu: adis16550: fix stack leak in trigger handler
adis16550_trigger_handler() declares the scan data array on the stack
without initializing it.  The memcpy() at the bottom fills only the
first 28 bytes (TEMP + 6 channels of GYRO/ACCEL data), and
iio_push_to_buffers_with_timestamp() writes the s64 timestamp at the
8-byte-aligned offset 32.  Bytes 28-31 remain uninitialized stack data
which leaks to userspace on ever trigger.

Fix this all by just zero-initializing the structure on the stack.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: David Lechner <dlechner@baylibre.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>
Cc: Andy Shevchenko <andy@kernel.org>
Fixes: e4570f4bb2 ("iio: imu: adis16550: align buffers for timestamp")
Cc: stable <stable@kernel.org>
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2026-05-15 12:01:38 +01:00
..
bmi160 iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin() 2026-03-15 12:20:34 +00:00
bmi270 iio: bmi270_i2c: Add MODULE_DEVICE_TABLE for BMI260/270 2026-01-11 13:02:19 +00:00
bmi323 iio: imu: bmi323: remove unused drdy_trigger_enabled 2026-03-03 21:20:03 +00:00
bno055 iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one 2026-03-01 12:25:43 +00:00
inv_icm42600 Linux 7.0-rc4 2026-03-22 12:20:42 +00:00
inv_icm45600 iio: imu: inv_icm45600: fix regulator put warning when probe fails 2026-02-23 08:24:39 +00:00
inv_mpu6050 Linux 7.0-rc4 2026-03-22 12:20:42 +00:00
smi330 iio: imu: smi330: Convert to common field_{get,prep}() helpers 2026-01-16 19:44:57 +00:00
st_lsm6dsx iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer 2026-05-15 12:01:38 +01:00
st_lsm9ds0
adis.c iio: imu: adis: Fix NULL pointer dereference in adis_init 2026-02-23 08:24:39 +00:00
adis16400.c iio: imu: adis16400: Use separate structures rather than an array for chip info 2025-07-13 15:36:24 +01:00
adis16460.c
adis16475.c iio: imu: adis16475: remove extra line 2025-08-16 11:57:07 +01:00
adis16480.c
adis16550.c iio: imu: adis16550: fix stack leak in trigger handler 2026-05-15 12:01:38 +01:00
adis_buffer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
adis_trigger.c
fxos8700.h
fxos8700_core.c
fxos8700_i2c.c
fxos8700_spi.c
Kconfig iio: imu: smi330: Add driver 2025-11-09 12:56:51 +00:00
kmx61.c iio: imu: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 16:06:04 +01:00
Makefile iio: imu: smi330: Add driver 2025-11-09 12:56:51 +00:00
smi240.c