iio: accel: mma8452: handle I2C read error(s) in mma8452_read()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 96c0cb2bbfe0a58bd0c37cf34d50a20f9cd75aa8 · < 1cddef80a180af74c33d2f26c962ce92b60fded4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: mma8452: handle I2C read error(s) in mma8452_read()
Currently, If i2c_smbus_read_i2c_block_data() fails but mma8452_set_runtime_pm_state() succeeds, mma8452_read() returns 0.
As a result, the caller mma8452_read_raw() assumes the read was successful and proceeds to use a buffer containing uninitialized stack memory.
Add proper checking of the I2C read return value and propagate errors to the caller.
From the CVE record · Linux
The mma8452 accelerometer driver can treat a failed I2C read as successful if updating its runtime power state succeeds, causing the caller to use uninitialized stack memory. The input does not establish what an attacker could do or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the mma8452 accelerometer driver should check their kernel's status; affected versions are not specified.