i2c: imx: fix clock and pinctrl state inconsistency in runtime PM
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 |
|
|
6.18.367.0.137.1In the Linux kernel, the following vulnerability has been resolved:
i2c: imx: fix clock and pinctrl state inconsistency in runtime PM
In i2c_imx_runtime_suspend(), the clock is disabled before switching the pinctrl state to sleep. If pinctrl_pm_select_sleep_state() fails, the runtime suspend is aborted but the clock remains disabled, causing a system crash when the hardware is subsequently accessed.
Fix this by switching the pinctrl state before disabling the clock so that a pinctrl failure leaves the clock enabled and the hardware accessible.
In i2c_imx_runtime_resume(), restore the pinctrl state back to sleep if clk_enable() fails to keep the consistent.
From the CVE record · Linux
The Linux kernel’s i2c imx driver can leave its clock disabled if switching pinctrl to sleep fails during runtime suspend. Subsequent hardware access can crash the system; the input does not describe an attacker path or specify access or interaction requirements.
Engineers running Linux kernels with the i2c imx driver should check their kernel version; affected versions are not specified.