CVE-2026-63967: iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer
The tagged FIFO path declares iio_buff on the stack with __aligned(8) but no initializer, but there is a hole in the structure, which will then leak to userspace as ST_LSM6DSX_SAMPLE_SIZE bytes (6) will be copied, but the space between that and the timestamp are not initialized.
Commit c14edb4d0bdc ("iio:imu:st_lsm6dsx Fix alignment and data leak issues") moved the untagged FIFO path to a kzalloc'd buffer in hw->scan, but for the tagged path it only added the alignment qualifier and not the initializer :(
Fix this by just zero-initializing the structure on the stack.
The Linux kernel CVE team has assigned CVE-2026-63967 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 5.10.259 with commit ff8d3c088b77b11782f2c3b97e37425be050e8de Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 5.15.210 with commit fe1a7f99e72ebd2880515332b79b8c256be22aca Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 6.1.176 with commit babf1943a40bb5669db57d30ca16c22504b18e07 Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 6.6.143 with commit d42ac0bfb6a16617c62a59d53706579c7fadbfa6 Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 6.12.93 with commit 3147b303b8c7d9f91da4b849ece33b45048f5eaf Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 6.18.35 with commit e6bb3a49c5f9de870ea95e69775df785728e3366 Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 7.0.12 with commit 890d0312d5f94be43eac21f5a34d3bccc60d051b Issue introduced in 5.10 with commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 and fixed in 7.1 with commit c9d8e9adaa63150ef7e833480b799d0bab83a276 Issue introduced in 5.9.5 with commit a42ca3b182ccb766666a0be1053921cba190e2de
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-63967
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/imu/st_lsm6dsx/st_lsm6dsx_buffer.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/ff8d3c088b77b11782f2c3b97e37425be050e8de https://git.kernel.org/stable/c/fe1a7f99e72ebd2880515332b79b8c256be22aca https://git.kernel.org/stable/c/babf1943a40bb5669db57d30ca16c22504b18e07 https://git.kernel.org/stable/c/d42ac0bfb6a16617c62a59d53706579c7fadbfa6 https://git.kernel.org/stable/c/3147b303b8c7d9f91da4b849ece33b45048f5eaf https://git.kernel.org/stable/c/e6bb3a49c5f9de870ea95e69775df785728e3366 https://git.kernel.org/stable/c/890d0312d5f94be43eac21f5a34d3bccc60d051b https://git.kernel.org/stable/c/c9d8e9adaa63150ef7e833480b799d0bab83a276