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:Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://lore.kernel.org/r/20240606212313.207550-4-vassilisamir@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> Signed-off-by:
Hongbo Li <lihongbo22@huawei.com>
Loading
Please register or sign in to comment