Skip to content
Commit cb10d70d authored by Vasileios Amoiridis's avatar Vasileios Amoiridis Committed by Hongbo Li
Browse files

iio: chemical: bme680: Fix overflows in compensate() functions

stable inclusion
from stable-v5.10.221
commit c326551e99f5416986074ce78bef94f6a404b517
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGEOZ
CVE: CVE-2024-42086

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c326551e99f5416986074ce78bef94f6a404b517

--------------------------------

commit fdd478c3ae98c3f13628e110dce9b6cfb0d9b3c8 upstream.

There are cases in the compensate functions of the driver that
there could be overflows of variables due to bit shifting ops.
These implications were initially discussed here [1] and they
were mentioned in log message of Commit 1b3bd859 ("iio:
chemical: Add support for Bosch BME680 sensor").

[1]: https://lore.kernel.org/linux-iio/20180728114028.3c1bbe81@archlinux/



Fixes: 1b3bd859 ("iio: chemical: Add support for Bosch BME680 sensor")
Signed-off-by: default avatarVasileios Amoiridis <vassilisamir@gmail.com>
Link: https://lore.kernel.org/r/20240606212313.207550-4-vassilisamir@gmail.com


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
parent 9a994eff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment