Subject: CVE-2024-42086: iio: chemical: bme680: Fix overflows in compensate() functions

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

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

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 1b3bd8592780 ("iio:
chemical: Add support for Bosch BME680 sensor").

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

The Linux kernel CVE team has assigned CVE-2024-42086 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 4.19.317 with commit 6fa31bbe2ea8
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 5.4.279 with commit b0af334616ed
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 5.10.221 with commit c326551e99f5
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 5.15.162 with commit 7a13d1357658
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 6.1.97 with commit ba1bb3e2a38a
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 6.6.37 with commit b5967393d50e
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 6.9.8 with commit 3add41bbda92
	Issue introduced in 4.19 with commit 1b3bd8592780 and fixed in 6.10 with commit fdd478c3ae98

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-42086
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/iio/chemical/bme680_core.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/6fa31bbe2ea8665ee970258eb8320cbf231dbe9e
	https://git.kernel.org/stable/c/b0af334616ed425024bf220adda0f004806b5feb
	https://git.kernel.org/stable/c/c326551e99f5416986074ce78bef94f6a404b517
	https://git.kernel.org/stable/c/7a13d1357658d3a3c1cd7b3b9543c805a6e5e6e9
	https://git.kernel.org/stable/c/ba1bb3e2a38a7fef1c1818dd4f2d9abbfdde553a
	https://git.kernel.org/stable/c/b5967393d50e3c6e632efda3ea3fdde14c1bfd0e
	https://git.kernel.org/stable/c/3add41bbda92938e9a528d74659dfc552796be4e
	https://git.kernel.org/stable/c/fdd478c3ae98c3f13628e110dce9b6cfb0d9b3c8