iio: accel: kionix-kx022a: Fix array boundary check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kionix-kx022a: Fix array boundary check
The driver performs a sanity check for an array size, when converting a register value to an array index. The check incorrectly accepts the sizeof(array) as a last index, when last valid index should be sizeof(array) - 1.
Fix the check by bailing out when index >= sizeof(array).
From the CVE record · Linux
The Linux kernel's kionix-kx022a accelerometer driver incorrectly accepts an array index equal to the array's size when converting a register value. This can cause an out-of-bounds array access; the input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels that include the kionix-kx022a driver should check whether their kernel contains the fix; affected versions are not specified.