CVE-2023-54175: i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path
The xiic_xfer() function gets a runtime PM reference when the function is entered. This reference is released when the function is exited. There is currently one error path where the function exits directly, which leads to a leak of the runtime PM reference.
Make sure that this error path also releases the runtime PM reference.
The Linux kernel CVE team has assigned CVE-2023-54175 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.16 with commit fdacc3c7405d1fc33c1f2771699a4fc24551e480 and fixed in 6.1.28 with commit 06e661a259978305c0015f6f33d14477a0cfbe8f Issue introduced in 5.16 with commit fdacc3c7405d1fc33c1f2771699a4fc24551e480 and fixed in 6.2.15 with commit 6027d84c073e26cb1b32a90d69c5fbad57776406 Issue introduced in 5.16 with commit fdacc3c7405d1fc33c1f2771699a4fc24551e480 and fixed in 6.3.2 with commit 688fdfc458bfa651dca39c736d39c1b7520af0e8 Issue introduced in 5.16 with commit fdacc3c7405d1fc33c1f2771699a4fc24551e480 and fixed in 6.4 with commit d663d93bb47e7ab45602b227701022d8aa16040a
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-54175
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/i2c/busses/i2c-xiic.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2d320d9de7d31c0eb279b3f8a02cf1af473a3737 https://git.kernel.org/stable/c/72cb227a368cf286efb8ce1e741e8c7085747b4d https://git.kernel.org/stable/c/06e661a259978305c0015f6f33d14477a0cfbe8f https://git.kernel.org/stable/c/6027d84c073e26cb1b32a90d69c5fbad57776406 https://git.kernel.org/stable/c/688fdfc458bfa651dca39c736d39c1b7520af0e8 https://git.kernel.org/stable/c/d663d93bb47e7ab45602b227701022d8aa16040a