blob: 46eec1c313c7541cd62e0ef9903174d7f98e9378 [file] [log] [blame]
From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2024-50232: iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()
In the ad7124_write_raw() function, parameter val can potentially
be zero. This may lead to a division by zero when DIV_ROUND_CLOSEST()
is called within ad7124_set_channel_odr(). The ad7124_write_raw()
function is invoked through the sequence: iio_write_channel_raw() ->
iio_write_channel_attribute() -> iio_channel_write(), with no checks
in place to ensure val is non-zero.
The Linux kernel CVE team has assigned CVE-2024-50232 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.13 with commit 7b8d045e497a04dd88546da51f34fa3b102778d2 and fixed in 5.15.171 with commit 4f588fffc307a4bc2761aee6ff275bb4b433e451
Issue introduced in 5.13 with commit 7b8d045e497a04dd88546da51f34fa3b102778d2 and fixed in 6.1.116 with commit f51343f346e6abde094548a7fb34472b0d4cae91
Issue introduced in 5.13 with commit 7b8d045e497a04dd88546da51f34fa3b102778d2 and fixed in 6.6.60 with commit 3dc0eda2cd5c653b162852ae5f0631bfe4ca5e95
Issue introduced in 5.13 with commit 7b8d045e497a04dd88546da51f34fa3b102778d2 and fixed in 6.11.7 with commit 0ac0beb4235a9a474f681280a3bd4e2a5bb66569
Issue introduced in 5.13 with commit 7b8d045e497a04dd88546da51f34fa3b102778d2 and fixed in 6.12 with commit efa353ae1b0541981bc96dbf2e586387d0392baa
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-50232
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/adc/ad7124.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/4f588fffc307a4bc2761aee6ff275bb4b433e451
https://git.kernel.org/stable/c/f51343f346e6abde094548a7fb34472b0d4cae91
https://git.kernel.org/stable/c/3dc0eda2cd5c653b162852ae5f0631bfe4ca5e95
https://git.kernel.org/stable/c/0ac0beb4235a9a474f681280a3bd4e2a5bb66569
https://git.kernel.org/stable/c/efa353ae1b0541981bc96dbf2e586387d0392baa