milos-linux/drivers/iio/pressure
Greg Kroah-Hartman 387c86b582 iio: pressure: bmp280: fix stack leak in bmp580 trigger handler
bmp580_trigger_handler() declares its scan buffer on the stack without
an initializer and then memcpy()s 3 bytes of 24-bit sensor data into
each 4-byte __le32 field.  The high byte of comp_temp and comp_press is
left uninitialized, and the channel storagebits is 32, so two bytes of
stack are pushed to userspace per scan.

This is a regression from when the buffer lived in the private data, the
move to a stack-local struct dropped the implicit zeroing.
bme280_trigger_handler() was fixed up to handle this bug, but this
driver was not fixed because there was no padding hole, but rather a
short-fill issue.

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

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: 872c8014e0 ("iio: pressure: bmp280: drop sensor_data array")
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
..
abp060mg.c iio: pressure: abp060mg: make abp_config const 2025-07-13 15:36:23 +01:00
abp2030pa.c iio: pressure: abp2030pa: Remove IRQF_ONESHOT from devm_request_irq() 2026-03-01 11:20:10 +00:00
abp2030pa.h iio: pressure: add Honeywell ABP2 driver 2025-12-21 11:41:13 +00:00
abp2030pa_i2c.c iio: pressure: add Honeywell ABP2 driver 2025-12-21 11:41:13 +00:00
abp2030pa_spi.c iio: pressure: add Honeywell ABP2 driver 2025-12-21 11:41:13 +00:00
adp810.c iio: pressure: adp810: Add driver for adp810 sensor 2025-11-09 12:57:04 +00:00
bmp280-core.c iio: pressure: bmp280: fix stack leak in bmp580 trigger handler 2026-05-15 12:01:38 +01:00
bmp280-i2c.c
bmp280-regmap.c
bmp280-spi.c iio: pressure: fix spelling mistakes in comments 2026-03-21 19:16:08 +00:00
bmp280.h
cros_ec_baro.c
dlhl60d.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
dps310.c
hid-sensor-press.c
hp03.c
hp206c.c
hsc030pa.c iio: pressure: fix spelling mistakes in comments 2026-03-21 19:16:08 +00:00
hsc030pa.h
hsc030pa_i2c.c iio: pressure: hsc030pa: Improve i2c_transfer return value handling 2026-03-03 21:20:00 +00:00
hsc030pa_spi.c
icp10100.c iio: pressure: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 16:16:23 +01:00
Kconfig iio: pressure: abp2030pa: fix typo in Kconfig description 2026-01-14 08:50:54 +00:00
Makefile iio: pressure: add Honeywell ABP2 driver 2025-12-21 11:41:13 +00:00
mpl115.c iio: pressure: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 16:16:23 +01:00
mpl115.h
mpl115_i2c.c
mpl115_spi.c
mpl3115.c iio: mpl3115: add threshold events support 2025-11-15 18:06:47 +00:00
mprls0025pa.c iio: pressure: mprls0025pa: remove error message 2026-01-22 20:53:18 +00:00
mprls0025pa.h iio: pressure: mprls0025pa: introduce tx buffer 2026-01-16 17:40:40 +00:00
mprls0025pa_i2c.c iio: pressure: mprls0025pa: move memset to core 2026-01-16 17:40:41 +00:00
mprls0025pa_spi.c iio: pressure: mprls0025pa: introduce tx buffer 2026-01-16 17:40:40 +00:00
ms5611.h
ms5611_core.c
ms5611_i2c.c
ms5611_spi.c
ms5637.c
rohm-bm1390.c iio: pressure: fix spelling mistakes in comments 2026-03-21 19:16:08 +00:00
sdp500.c
st_pressure.h
st_pressure_buffer.c
st_pressure_core.c
st_pressure_i2c.c
st_pressure_spi.c
t5403.c
zpa2326.c iio: pressure: fix spelling mistakes in comments 2026-03-21 19:16:08 +00:00
zpa2326.h
zpa2326_i2c.c
zpa2326_spi.c