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

Lee Jones posted 7 patches 1 day, 6 hours ago
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(-)
[PATCH v2 0/7] iio: Fix memory corruption, teardown races and bounds checks
Posted by Lee Jones 1 day, 6 hours ago
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@kernel.org/

Cc: Alexandru Ardelean <ardeleanalex@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Bogdan Bolocan <bogdan.bolocan@microchip.com>
Cc: David Lechner <dlechner@baylibre.com>
Cc: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux@analog.com
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: Lothar Rubusch <l.rubusch@gmail.com>
Cc: Lucas Stankus <lucas.p.stankus@gmail.com>
Cc: Marius Cristea <marius.cristea@microchip.com>
Cc: Mathieu Othacehe <othacehe@gnu.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Nuno Sá <nuno.sa@analog.com>
Cc: Radu Sabau <radu.sabau@analog.com>

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