linux/drivers/iio/magnetometer
zhili.liu 36a49290d7 iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC
commit 792595bab4 upstream.

Recently, we encounter kernel crash in function rm3100_common_probe
caused by out of bound access of array rm3100_samp_rates (because of
underlying hardware failures). Add boundary check to prevent out of
bound access.

Fixes: 121354b2ec ("iio: magnetometer: Add driver support for PNI RM3100")
Suggested-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: zhili.liu <zhili.liu@ucas.com.cn>
Link: https://lore.kernel.org/r/1704157631-3814-1-git-send-email-zhouzhouyi@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:42:27 +01:00
..
ak8974.c
ak8975.c iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() 2022-05-09 09:04:58 +02:00
bmc150_magn_i2c.c
bmc150_magn_spi.c
bmc150_magn.c iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
bmc150_magn.h
hid-sensor-magn-3d.c
hmc5843_core.c
hmc5843_i2c.c
hmc5843_spi.c
hmc5843.h
Kconfig
mag3110.c
Makefile
mmc35240.c
rm3100-core.c iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC 2024-02-23 08:42:27 +01:00
rm3100-i2c.c
rm3100-spi.c
rm3100.h
st_magn_buffer.c
st_magn_core.c iio: st_sensors: Call st_sensors_power_enable() from bus drivers 2021-11-18 14:04:13 +01:00
st_magn_i2c.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_magn_spi.c iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
st_magn.h