i2c: lpi2c: Avoid calling clk_get_rate during transfer
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.6.646.9.76.10In the Linux kernel, the following vulnerability has been resolved:
i2c: lpi2c: Avoid calling clk_get_rate during transfer
Instead of repeatedly calling clk_get_rate for each transfer, lock the clock rate and cache the value. A deadlock has been observed while adding tlv320aic32x4 audio codec to the system. When this clock provider adds its clock, the clk mutex is locked already, it needs to access i2c, which in return needs the mutex for clk_get_rate as well.
From the CVE record · Linux
The Linux kernel's lpi2c driver can deadlock when a clock provider accesses I²C while holding the clock mutex, and the transfer calls clk_get_rate. This was observed while adding a tlv320aic32x4 audio codec. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with the lpi2c driver should check whether their kernel includes the fix; affected versions are not specified.