Files
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 <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: David Lechner <[email protected]>
Cc: "Nuno Sá" <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Fixes: e4570f4bb2 ("iio: imu: adis16550: align buffers for timestamp")
Cc: stable <[email protected]>
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: David Lechner <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
2026-05-15 12:01:38 +01:00
..
2025-11-09 12:56:51 +00:00
2025-11-09 12:56:51 +00:00