CVE-2022-50152: usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
The Linux kernel CVE team has assigned CVE-2022-50152 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 4.14.291 with commit 591ab8dbf6c21927f23f83ddb90691f48b86d136 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 4.19.256 with commit 4db00c2fa6f8c9876a7e20511dccf43b50be9006 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 5.4.211 with commit 65d36ec409b635dfc2f95f0d7c5877c9d0cb7630 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 5.10.137 with commit d35903e9650f4fa79426ce390db8678dbf5ac432 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 5.15.61 with commit 59026d5cc615da28e0c9806a71bf07065c906464 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 5.18.18 with commit a0fbac3bf26a11f084233519ddf3fd5e5bb28939 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 5.19.2 with commit 50238c4b54c2ac6c2da7a84a4a2b0a570e3da0e2 Issue introduced in 3.5 with commit 73108aa90cbfc663649885a06fe5c1235307de1c and fixed in 6.0 with commit 302970b4cad3ebfda2c05ce06c322ccdc447d17e
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-50152
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/usb/host/ohci-nxp.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/591ab8dbf6c21927f23f83ddb90691f48b86d136 https://git.kernel.org/stable/c/4db00c2fa6f8c9876a7e20511dccf43b50be9006 https://git.kernel.org/stable/c/65d36ec409b635dfc2f95f0d7c5877c9d0cb7630 https://git.kernel.org/stable/c/d35903e9650f4fa79426ce390db8678dbf5ac432 https://git.kernel.org/stable/c/59026d5cc615da28e0c9806a71bf07065c906464 https://git.kernel.org/stable/c/a0fbac3bf26a11f084233519ddf3fd5e5bb28939 https://git.kernel.org/stable/c/50238c4b54c2ac6c2da7a84a4a2b0a570e3da0e2 https://git.kernel.org/stable/c/302970b4cad3ebfda2c05ce06c322ccdc447d17e