CVE-2024-57907: iio: adc: rockchip_saradc: fix information leak in triggered buffer
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: rockchip_saradc: fix information leak in triggered buffer
The 'data' local struct is used to push data to user space from a triggered buffer, but it does not set values for inactive channels, as it only uses iio_for_each_active_channel() to assign new values.
Initialize the struct to zero before using it to avoid pushing uninitialized information to userspace.
The Linux kernel CVE team has assigned CVE-2024-57907 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.9 with commit 4e130dc7b41348b13684f0758c26cc6cf72a3449 and fixed in 6.6.72 with commit 5a95fbbecec7a34bbad5dcc3156700b8711d53c4 Issue introduced in 5.9 with commit 4e130dc7b41348b13684f0758c26cc6cf72a3449 and fixed in 6.12.10 with commit 8193941bc4fe7247ff13233f328aea709f574554 Issue introduced in 5.9 with commit 4e130dc7b41348b13684f0758c26cc6cf72a3449 and fixed in 6.13-rc7 with commit 38724591364e1e3b278b4053f102b49ea06ee17c
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-57907
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/rockchip_saradc.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/5a95fbbecec7a34bbad5dcc3156700b8711d53c4 https://git.kernel.org/stable/c/8193941bc4fe7247ff13233f328aea709f574554 https://git.kernel.org/stable/c/38724591364e1e3b278b4053f102b49ea06ee17c