CVE-2022-48968: octeontx2-pf: Fix potential memory leak in otx2_init_tc()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
octeontx2-pf: Fix potential memory leak in otx2_init_tc()
In otx2_init_tc(), if rhashtable_init() failed, it does not free tc->tc_entries_bitmap which is allocated in otx2_tc_alloc_ent_bitmap().
The Linux kernel CVE team has assigned CVE-2022-48968 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 2e2a8126ffac and fixed in 5.15.83 with commit eefd8953a748 Issue introduced in 5.15 with commit 2e2a8126ffac and fixed in 6.0.13 with commit db5ec358cf4e Issue introduced in 5.15 with commit 2e2a8126ffac and fixed in 6.1 with commit fbf33f5ac76f
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-48968
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/net/ethernet/marvell/octeontx2/nic/otx2_tc.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/eefd8953a74822cb72006632b9ee9dd95f92c146 https://git.kernel.org/stable/c/db5ec358cf4ef0ab382ee733d05f018e8bef9462 https://git.kernel.org/stable/c/fbf33f5ac76f2cdb47ad9763f620026d5cfa57ce