diff options
| author | David Carlier <devnexen@gmail.com> | 2026-05-05 20:34:55 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-05-16 13:23:58 +0300 |
| commit | 1172160f2a2de7bade3bec64b8c5ecf945cde5ed (patch) | |
| tree | 44e22478495673d93156f036f90d7f7e8e81e7dd /scripts/Makefile.thinlto | |
| parent | 95e8a48d7a85d4226934020e57815a3316d3a14b (diff) | |
| download | linux-1172160f2a2de7bade3bec64b8c5ecf945cde5ed.tar.xz | |
iio: pressure: bmp280: zero-init bmp580 trigger handler buffer
bmp580_trigger_handler() builds an on-stack scan buffer containing
two __le32 fields and an aligned_s64 timestamp, and pushes it to
userspace via iio_push_to_buffers_with_ts(). However, only the low
3 bytes of each __le32 field are populated by the device data:
memcpy(&buffer.comp_press, &data->buf[3], 3);
memcpy(&buffer.comp_temp, &data->buf[0], 3);
The high byte of each field is left uninitialised on the stack.
The bmp580 channels declare storagebits = 32, so the IIO core
transports all four bytes per sample to userspace as part of the
scan element, leaking two bytes of kernel stack per scan.
Zero-initialise the buffer before populating it, mirroring the fix
applied to bme280_trigger_handler() in commit 018f50909e66 ("iio:
bmp280: zero-init buffer").
Fixes: 872c8014e05e ("iio: pressure: bmp280: drop sensor_data array")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
