CVE-2026-98680: iio: accel: kionix-kx022a: Prevent memory leak and fix state
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kionix-kx022a: Prevent memory leak and fix state
The driver allocates memory for samples at buffer enable path. If regmap operation fails in the kx022a_fifo_enable() at the buffer enable path, the allocated memory is never freed. Furthermore, the state information and previous hardware configuration(s) aren't undone, potentially leaving WMI interrupts and buffers enabled, or driver state flags wrong.
Free the memory and revert the hardware configuration and state flags on error path.
The Linux kernel CVE team has assigned CVE-2026-98680 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.7 with commit e7123a4dfcd732c4d10620748588e3715f362802 and fixed in 6.12.113 with commit e3bc345d08639e62b629e0ec0799f7fb45e21372 Issue introduced in 6.7 with commit e7123a4dfcd732c4d10620748588e3715f362802 and fixed in 6.18.56 with commit 5c7ca8fe72064c1c3c7a7418031f692bb2bff260 Issue introduced in 6.7 with commit e7123a4dfcd732c4d10620748588e3715f362802 and fixed in 7.2.10 with commit 2ef953f7b54e1460718116b4c0a4c63b106348fc Issue introduced in 6.7 with commit e7123a4dfcd732c4d10620748588e3715f362802 and fixed in 7.3-rc6 with commit e65e128b51a37dd1a9056ac3d1705d805a5c8bb0
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-98680
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/e3bc345d08639e62b629e0ec0799f7fb45e21372 https://git.kernel.org/stable/c/5c7ca8fe72064c1c3c7a7418031f692bb2bff260 https://git.kernel.org/stable/c/2ef953f7b54e1460718116b4c0a4c63b106348fc https://git.kernel.org/stable/c/e65e128b51a37dd1a9056ac3d1705d805a5c8bb0