CVE-2023-53196: usb: dwc3: qcom: Fix potential memory leak
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: qcom: Fix potential memory leak
Function dwc3_qcom_probe() allocates memory for resource structure which is pointed by parent_res pointer. This memory is not freed. This leads to memory leak. Use stack memory to prevent memory leak.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
The Linux kernel CVE team has assigned CVE-2023-53196 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 5.4.251 with commit 648a163cff21ea355c8765e882ba8bf66a870a3e Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 5.10.188 with commit 74f8606ddfa450d2255b4e61472a7632def1e8c4 Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 5.15.121 with commit b626cd5e4a87a281629e0c2b07519990077c0fbe Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 6.1.39 with commit c3b322b84ab5dda7eaca9ded763628b7467734f4 Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 6.4.4 with commit 134a7d4642f11daed6bbc378f930a54dd0322291 Issue introduced in 5.3 with commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c and fixed in 6.5 with commit 097fb3ee710d4de83b8d4f5589e8ee13e0f0541e
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-53196
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/dwc3/dwc3-qcom.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/648a163cff21ea355c8765e882ba8bf66a870a3e https://git.kernel.org/stable/c/74f8606ddfa450d2255b4e61472a7632def1e8c4 https://git.kernel.org/stable/c/b626cd5e4a87a281629e0c2b07519990077c0fbe https://git.kernel.org/stable/c/c3b322b84ab5dda7eaca9ded763628b7467734f4 https://git.kernel.org/stable/c/134a7d4642f11daed6bbc378f930a54dd0322291 https://git.kernel.org/stable/c/097fb3ee710d4de83b8d4f5589e8ee13e0f0541e