Vulnerability in Kernel: iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot
Summary
GSD-2022-1000798: iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot. Affects Kernel versions >= 290a6ce11d938be52634b3ce1bbc6b78be4d23c1, < 1f05c75684455f1fd0c43637f5c86981a3f80a81. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Kernel is a critical component of the Linux operating system, responsible for managing system resources and facilitating communication between hardware and software. It provides essential functionalities and drivers for various hardware devices. One such driver is the iio: imu: st_lsm6dsx, which is used for interacting with STMicroelectronics LSM6DSx inertial measurement units (IMUs). IMUs are commonly used in applications such as motion tracking, orientation sensing, and gesture recognition. The st_lsm6dsx_read_oneshot function within this driver is susceptible to a vulnerability.
Vulnerability Detail
The vulnerability in the iio: imu: st_lsm6dsx driver lies in the failure to wait for the settling time before reading data in the st_lsm6dsx_read_oneshot function. This can result in inaccurate or inconsistent data being read from the IMU. An attacker could potentially exploit this vulnerability to manipulate the data read from the IMU, leading to incorrect sensor readings and potentially impacting applications relying on accurate sensor data. The vulnerability was introduced in Linux Kernel version v4.11 and has been fixed in version v5.15.26.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can manually implement a delay to allow for settling time before reading data from the IMU. This can be achieved by adding a sleep or delay function in the code that calls the st_lsm6dsx_read_oneshot function. Here is an example in C:
#include <unistd.h>
void read_imu_data() {
// Wait for settling time
usleep(1000);
// Call st_lsm6dsx_read_oneshot function
st_lsm6dsx_read_oneshot();
}
Conclusion
The vulnerability in the iio: imu: st_lsm6dsx driver can lead to inaccurate or inconsistent data being read from the IMU, potentially impacting applications relying on accurate sensor data. It is crucial to update the Linux Kernel to version v5.15.26 or later to mitigate this vulnerability. Alternatively, a workaround involving a manual delay can be implemented. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can result in inaccurate or inconsistent data being read from the IMU, potentially impacting applications relying on accurate sensor data.
An attacker could manipulate the data read from the IMU by exploiting the failure to wait for settling time, leading to incorrect sensor readings and potentially affecting applications utilizing the sensor data.
Yes, the vulnerability has been fixed in Linux Kernel version v5.15.26. It is recommended to update to this version or later to mitigate the vulnerability.
A workaround is available, which involves manually implementing a delay to allow for settling time before reading data from the IMU. However, updating the Kernel to the fixed version is the recommended approach.
For more details about this vulnerability, you can refer to the vulnerability report in the GSD database: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1000xxx/GSD-2022-1000798.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.