linux-stable/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
Makefile
ak8974.c
ak8975.c
bmc150_magn.c
bmc150_magn.h
bmc150_magn_i2c.c
bmc150_magn_spi.c
hid-sensor-magn-3d.c
hmc5843.h
hmc5843_core.c
hmc5843_i2c.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
hmc5843_spi.c
mag3110.c
mmc35240.c
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
rm3100-spi.c
rm3100.h
st_magn.h
st_magn_buffer.c
st_magn_core.c
st_magn_i2c.c
st_magn_spi.c
yamaha-yas530.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00