CVE-2026-98835: iio: accel: kionix-kx022a: Fix array boundary check
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kionix-kx022a: Fix array boundary check
The driver performs a sanity check for an array size, when converting a register value to an array index. The check incorrectly accepts the sizeof(array) as a last index, when last valid index should be sizeof(array) - 1.
Fix the check by bailing out when index >= sizeof(array).
The Linux kernel CVE team has assigned CVE-2026-98835 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit 7c1d1677b3227c6b18ac999f2b84778baa280b8f and fixed in 6.12.113 with commit 87746be179dca4d94d73d5a323a39a87bb2e90fc Issue introduced in 6.2 with commit 7c1d1677b3227c6b18ac999f2b84778baa280b8f and fixed in 6.18.56 with commit 4c73c1859fa64509aae7e23a6dbd2d5c8a64c05d Issue introduced in 6.2 with commit 7c1d1677b3227c6b18ac999f2b84778baa280b8f and fixed in 7.2.10 with commit 22d377178de281d21ddf908d03a8e9fde3339d9f Issue introduced in 6.2 with commit 7c1d1677b3227c6b18ac999f2b84778baa280b8f and fixed in 7.3-rc6 with commit 0e65412aee4f651d2c9785f542a13e4b44002a75
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-2026-98835
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/accel/kionix-kx022a.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/87746be179dca4d94d73d5a323a39a87bb2e90fc https://git.kernel.org/stable/c/4c73c1859fa64509aae7e23a6dbd2d5c8a64c05d https://git.kernel.org/stable/c/22d377178de281d21ddf908d03a8e9fde3339d9f https://git.kernel.org/stable/c/0e65412aee4f651d2c9785f542a13e4b44002a75