CVE-2022-48820: phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
This error path needs to decrement "usbphyc->n_pll_cons.counter" before returning.
The Linux kernel CVE team has assigned CVE-2022-48820 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.12 with commit 5b1af71280ab and fixed in 5.15.24 with commit 94b16ca86ab6 Issue introduced in 5.12 with commit 5b1af71280ab and fixed in 5.16.10 with commit 0ad1a88fa3eb Issue introduced in 5.12 with commit 5b1af71280ab and fixed in 5.17 with commit cfc826c88a79
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-2022-48820
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/phy/st/phy-stm32-usbphyc.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/94b16ca86ab688ed6fad4548f70137f93cf1f0a9 https://git.kernel.org/stable/c/0ad1a88fa3eb0ded7798f52b79bc33f75fc9a6d2 https://git.kernel.org/stable/c/cfc826c88a79e22ba5d8001556eb2c7efd8a01b6