summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hwmon.c
diff options
context:
space:
mode:
authorAnton Vasilyev <vasilyev@ispras.ru>2017-08-10 18:46:32 +0200
committerGuenter Roeck <linux@roeck-us.net>2017-08-13 17:24:08 +0200
commit3be6bd690da0dafa55eb65279fb25297fcfe19d5 (patch)
tree8334fcb24a1feafc8fbb7672e4cfc5a01d84c144 /drivers/hwmon/hwmon.c
parenthwmon: (ftsteutates) Fix clearing alarm sysfs entries (diff)
downloadlinux-3be6bd690da0dafa55eb65279fb25297fcfe19d5.tar.xz
linux-3be6bd690da0dafa55eb65279fb25297fcfe19d5.zip
hwmon: (stts751) buffer overrun on wrong chip configuration
If stts751 hw by some reason reports conversion rate bigger then 9: ret = i2c_smbus_read_byte_data(priv->client, STTS751_REG_RATE); then dereferencing stts751_intervals[priv->interval] leads to buffer overrun. The patch adds sanity check for value stored on chip. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 7f07ec0fa17a ("hwmon: new driver for ST stts751 thermal sensor") Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/hwmon.c')
0 files changed, 0 insertions, 0 deletions