CVE-2026-31764
Description
In the Linux kernel, the following vulnerability has been resolved:
iio: imu: st_lsm6dsx: Set buffer sampling frequency for accelerometer only
The st_lsm6dsx_hwfifo_odr_store() function, which is called when userspace writes the buffer sampling frequency sysfs attribute, calls st_lsm6dsx_check_odr(), which accesses the odr_table array at index sensor->id; since this array is only 2 entries long, an access for any sensor type other than accelerometer or gyroscope is an out-of-bounds access.
The motivation for being able to set a buffer frequency different from the sensor sampling frequency is to support use cases that need accurate event detection (which requires a high sampling frequency) while retrieving sensor data at low frequency. Since all the supported event types are generated from acceleration data only, do not create the buffer sampling frequency attribute for sensor types other than the accelerometer.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Out-of-bounds access in Linux kernel's ST LSM6DSX IMU driver when setting buffer sampling frequency for non-accelerometer sensors.
Vulnerability
The Linux kernel's ST LSM6DSX IMU driver contains an out-of-bounds (OOB) access vulnerability in the st_lsm6dsx_hwfifo_odr_store() function. This function is invoked when userspace writes to the buffer sampling frequency sysfs attribute. It calls st_lsm6dsx_check_odr(), which indexes the odr_table array using sensor->id. The array is only two entries long, designed for accelerometer and gyroscope IDs. For any other sensor type, the access goes beyond the array bounds [1], [2].
Exploitation
The vulnerability can be triggered by writing to the buffer sampling frequency sysfs attribute of a sensor type other than accelerometer or gyroscope. This requires local access to the system and the ability to interact with the IIO subsystem, but no special privileges are needed for the write itself. The OOB read/write occurs in kernel space, potentially leading to memory corruption.
Impact
An attacker exploiting this vulnerability could cause a kernel crash (denial of service) or potentially elevate privileges by corrupting kernel memory. The specific impact depends on the memory layout and the attacker's ability to control the out-of-bounds index.
Mitigation
The fix, already applied in stable kernel commits, removes the buffer sampling frequency attribute for all sensor types except the accelerometer [1], [2]. Users are advised to update their kernels to include these patches.
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
9(expand)+ 7 more
- (no CPE)
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*range: >=6.19,<6.19.12
- cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
News mentions
0No linked articles in our index yet.