i2c: imx: preserve error state in block data length handler
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i2c: imx: preserve error state in block data length handler
When a block read returns an invalid length, zero or >I2C_SMBUS_BLOCK_MAX, the length handler sets the state to IMX_I2C_STATE_FAILED. However, i2c_imx_master_isr() unconditionally overwrites this with IMX_I2C_STATE_READ_CONTINUE, causing an endless read loop that overruns buffers and crashes the system.
Guard the state transition to preserve error states set by the length handler.
From the CVE record · Linux
The Linux kernel’s i2c imx handler can overwrite an error state when a block read returns an invalid length. This can cause an endless read loop, buffer overrun, and system crash. The input does not specify how an attacker could trigger the condition or whether access or user interaction is required.
Engineers running Linux kernels that use the i2c imx driver should check whether their kernel is affected; affected versions are not specified.