Skip to contentSkip to conversation

CVE-2024-43852: hwmon: (ltc2991) re-order conditions to fix off by one bug

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 17, 2024

lore
Share & tools
lore
#0 lore raw

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

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

hwmon: (ltc2991) re-order conditions to fix off by one bug

LTC2991_T_INT_CH_NR is 4. The st->temp_en[] array has LTC2991_MAX_CHANNEL
(4) elements. Thus if "channel" is equal to LTC2991_T_INT_CH_NR then we have read one element beyond the end of the array. Flip the conditions around so that we check if "channel" is valid before using it as an array index.

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

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

	Issue introduced in 6.7 with commit 2b9ea4262ae9 and fixed in 6.10.3 with commit c180311c0a52
	Issue introduced in 6.7 with commit 2b9ea4262ae9 and fixed in 6.11-rc1 with commit 99bf7c2eccff

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-43852

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/hwmon/ltc2991.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/c180311c0a520692e2d0e9ca44dcd6c2ff1b41c4
	https://git.kernel.org/stable/c/99bf7c2eccff82760fa23ce967cc67c8c219c6a6