[PATCH v2 0/7] iio: Fix memory corruption, teardown races and bounds checks

From: Lee Jones

Date: Mon Nov 23 2026 - 02:51:32 EST


These issues were reported by Sashiko.

None of these changes have been tested on physical hardware.

v1 => v2:
- Drop the 3 patches already applied upstream (stm32-adc x2, tsl2591)
- Rebase onto fixes-togreg
- CC Radu Sabau on the adis patch (Jonathan)
- adxl313: Return -EIO on excessive FIFO entry count and -ERANGE on
sub-base ODR codes (Andy, Jonathan)
- pac1934: Order local variables in reverse Christmas tree style and
scope the loop index j to the for-loop (Andy, Jonathan)
- qcom-spmi-adc5-gen3: Manage tm_props and the OF node reference via
adc5_gen3_aux_device_release(), register auxiliary_device_destroy()
with devm_add_action_or_reset(), and return -ENOENT on an empty reg
property (Andy, Jonathan)
- isl29501: Use HZ_PER_MHZ, group range checks by variable, and order
local declarations in reverse Christmas tree style (Andy)

v1: https://lore.kernel.org/all/20261119153151.1397003-1-lee@xxxxxxxxxx/

Cc: Alexandru Ardelean <ardeleanalex@xxxxxxxxx>
Cc: Andy Shevchenko <andy@xxxxxxxxxx>
Cc: Bogdan Bolocan <bogdan.bolocan@xxxxxxxxxxxxx>
Cc: David Lechner <dlechner@xxxxxxxxxxxx>
Cc: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
Cc: linux@xxxxxxxxxx
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: linux-iio@xxxxxxxxxxxxxxx
Cc: Lothar Rubusch <l.rubusch@xxxxxxxxx>
Cc: Lucas Stankus <lucas.p.stankus@xxxxxxxxx>
Cc: Marius Cristea <marius.cristea@xxxxxxxxxxxxx>
Cc: Mathieu Othacehe <othacehe@xxxxxxx>
Cc: Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>
Cc: Nuno Sá <nuno.sa@xxxxxxxxxx>
Cc: Radu Sabau <radu.sabau@xxxxxxxxxx>

Lee Jones (7):
iio: imu: adis: Clear pointers after freeing in
adis_update_scan_mode()
iio: accel: adxl313: Prevent FIFO buffer overflow in
adxl313_fifo_transfer()
iio: accel: adxl313: Reject sub-base ODR codes in adxl313_read_raw()
iio: adc: pac1934: Fix custom attribute allocation and channel bounds
iio: adc: qcom-spmi-adc5-gen3: Free TM auxiliary device wrapper in
release callback
iio: adc: qcom-spmi-adc5-gen3: Reject empty reg property in probe
iio: proximity: isl29501: Fix division by zero and overflow in
isl29501_set_freq()

drivers/iio/accel/adxl313.h | 2 +-
drivers/iio/accel/adxl313_core.c | 13 +++++-
drivers/iio/adc/pac1934.c | 33 +++++++--------
drivers/iio/adc/qcom-spmi-adc5-gen3.c | 59 +++++++++++++--------------
drivers/iio/imu/adis_buffer.c | 2 +
drivers/iio/proximity/isl29501.c | 13 ++++--
6 files changed, 68 insertions(+), 54 deletions(-)

--
2.56.1.750.gf70dc682cf-goog