linux-sg2042/drivers/iio/magnetometer
zhili.liu 176256ff8a 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 09:12:40 +01:00
..
Kconfig iio: magnetometer: yas530: Add YAS537 variant 2022-08-15 22:30:04 +01:00
Makefile iio: magnetometer: Add driver for Yamaha YAS530 2021-01-09 21:52:46 +00:00
ak8974.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ak8975.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
bmc150_magn.c iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
bmc150_magn.h iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
bmc150_magn_i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
bmc150_magn_spi.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
hid-sensor-magn-3d.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
hmc5843.h iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
hmc5843_core.c iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
hmc5843_i2c.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
hmc5843_spi.c iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
mag3110.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
mmc35240.c iio:magn:mmc35240: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
rm3100-core.c iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC 2024-02-23 09:12:40 +01:00
rm3100-i2c.c iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace 2022-02-18 11:42:27 +00:00
rm3100-spi.c iio:magnetometer:rm3100: Move exports to IIO_RM3100 namespace 2022-02-18 11:42:27 +00:00
rm3100.h
st_magn.h iio: magn: st_magn: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00
st_magn_buffer.c iio:st-sensors: Remove duplicate MODULE_* 2022-02-18 11:36:54 +00:00
st_magn_core.c iio: st_sensors: Stop abusing mlock to ensure internal coherency 2022-04-10 16:21:45 +01:00
st_magn_i2c.c iio:st-sensors: Move exports into IIO_ST_SENSORS namespace 2022-02-18 11:36:54 +00:00
st_magn_spi.c iio:st-sensors: Move exports into IIO_ST_SENSORS namespace 2022-02-18 11:36:54 +00:00
yamaha-yas530.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00