CVE-2026-64224: octeontx2-pf: fix double free in rvu_rep_rsrc_init()
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026072417-CVE-2026-64224-f7a2@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: octeontx2-pf: fix double free in rvu_rep_rsrc_init() rvu_rep_rsrc_init() allocates queue memory before calling otx2_init_hw_resources(). When hardware resource setup fails, otx2_init_hw_resources() already unwinds the partially initialized SQ, CQ, and aura state before returning an error. The representor error path then calls otx2_free_hw_resources() again and can free the same resources a second time. Fix this by splitting the cleanup labels so that a failure from otx2_init_hw_resources() only releases queue memory. Keep the otx2_free_hw_resources() call for failures that happen after hardware resource initialization completed successfully. The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. Manual inspection confirms that the bug is still present in v7.1-rc3. Runtime validation was not performed because reproducing this path requires OcteonTX2 representor hardware. The Linux kernel CVE team has assigned CVE-2026-64224 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 3937b7308d4fce2793fa7fa56ed0faf0f8b6dc7a and fixed in 6.18.34 with commit 8864b664d0443ecb8e56690e5546fcda5fe5e81b Issue introduced in 6.13 with commit 3937b7308d4fce2793fa7fa56ed0faf0f8b6dc7a and fixed in 7.0.11 with commit eb72a65f2bb2cc059e2ca5d83de01fdf3ea602ad Issue introduced in 6.13 with commit 3937b7308d4fce2793fa7fa56ed0faf0f8b6dc7a and fixed in 7.1 with commit e8fb3de2a8effcaf62bec2c56b93d8bb480371d1 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-2026-64224 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/rep.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/8864b664d0443ecb8e56690e5546fcda5fe5e81b https://git.kernel.org/stable/c/eb72a65f2bb2cc059e2ca5d83de01fdf3ea602ad https://git.kernel.org/stable/c/e8fb3de2a8effcaf62bec2c56b93d8bb480371d1