CVE-2026-92509: RDMA/core: Fix potential use after free in counter_release()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Fix potential use after free in counter_release()
When accessing a counter via the netlink path the only synchronization mechanism for the said counter is rdma_restrack_get(). Currently, rdma_restrack_del() is invoked at the end of counter_release(), which is too late, since by that point vendor-specific resources associated with the counter might already be freed. This can leave a short window where the counter remains accessible through restrack, leading to a potential use-after-free.
Fix this by moving the rdma_restrack_del() call to be before the freeing of the vendor-specific resources, ensuring that the counter is removed from restrack before its internal resources are released. This guarantees that no new users hold references to a counter that is in the process of destruction.
The Linux kernel CVE team has assigned CVE-2026-92509 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 6.1.188 with commit 5eb0c57a8b568eb08f464861d84d518a2af939ac Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 6.6.157 with commit d5cc211e8c39e46f357d30a092d683e84d560de9 Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 6.12.110 with commit 2f0c6705e26ba92c0c6b0b0908a2d3f35a039d5b Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 6.18.52 with commit 8c013e3a8d8273da4d47bf1c27f016a3551996f5 Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 7.2.6 with commit 64c72390d8407ea86de712a477c796b07d37abc4 Issue introduced in 5.3 with commit 99fa331dc8629be55ac7a0cca0dc56492070ddac and fixed in 7.3-rc1 with commit 235ef2d0e750885c29340b0fc40620a7a4f52e12
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-92509
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/infiniband/core/counters.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/5eb0c57a8b568eb08f464861d84d518a2af939ac https://git.kernel.org/stable/c/d5cc211e8c39e46f357d30a092d683e84d560de9 https://git.kernel.org/stable/c/2f0c6705e26ba92c0c6b0b0908a2d3f35a039d5b https://git.kernel.org/stable/c/8c013e3a8d8273da4d47bf1c27f016a3551996f5 https://git.kernel.org/stable/c/64c72390d8407ea86de712a477c796b07d37abc4 https://git.kernel.org/stable/c/235ef2d0e750885c29340b0fc40620a7a4f52e12