linux-next/drivers/iio/dummy
Javier Carrasco 333be433ee iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer
The 'data' array is allocated via kmalloc() and it is used to push data
to user space from a triggered buffer, but it does not set values for
inactive channels, as it only uses iio_for_each_active_channel()
to assign new values.

Use kzalloc for the memory allocation to avoid pushing uninitialized
information to userspace.

Cc: stable@vger.kernel.org
Fixes: 415f792447 ("iio: Move IIO Dummy Driver out of staging")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241125-iio_memset_scan_holes-v1-9-0cb6e98d895c@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-12-07 17:23:41 +00:00
..
iio_dummy_evgen.c iio: dummy_evgen: remove Excess kernel-doc comments 2024-02-17 16:16:09 +00:00
iio_dummy_evgen.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iio_simple_dummy_buffer.c iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2024-12-07 17:23:41 +00:00
iio_simple_dummy_events.c iio: dummy: use specialized event code macros 2024-11-03 20:33:45 +00:00
iio_simple_dummy.c iio: dummy: Use automatic lock and direct mode cleanup. 2024-02-17 16:16:10 +00:00
iio_simple_dummy.h iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
Kconfig iio: dummy: Fix build error when CONFIG_IIO_TRIGGERED_BUFFER is not set 2021-06-13 17:00:17 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00