CVE-2025-71146: netfilter: nf_conncount: fix leaked ct in error paths
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conncount: fix leaked ct in error paths
There are some situations where ct might be leaked as error paths are skipping the refcounted check and return immediately. In order to solve it make sure that the check is always called.
The Linux kernel CVE team has assigned CVE-2025-71146 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12.63 with commit 3558faee8aace3541189c3a2ca45c7e85e144b44 and fixed in 6.12.64 with commit 0b88be7211d21a0d68bb1e56dc805944e3654d6f Issue introduced in 6.18.2 with commit f6904ed15ed1a188543057e3cb0d02daa80edfc9 and fixed in 6.18.3 with commit 4bd2b89f4028f250dd1c1625eb3da1979b04a5e8 Issue introduced in 6.19-rc1 with commit be102eb6a0e7c03db00e50540622f4e43b2d2844 and fixed in 6.19-rc2 with commit 2e2a720766886190a6d35c116794693aabd332b6 Issue introduced in 6.17.13 with commit 8c2da7330214ce30f8333d1799a27ed0a9418f07
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-2025-71146
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:
net/netfilter/nf_conncount.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/08fa37f4c8c59c294e9c18fea2d083ee94074e5a https://git.kernel.org/stable/c/e1ac8dce3a893641bef224ad057932f142b8a36f https://git.kernel.org/stable/c/f381a33f34dda9e4023e38ba68c943bca83245e9 https://git.kernel.org/stable/c/325eb61bb30790ea27782203a17b007ce1754a67 https://git.kernel.org/stable/c/0b88be7211d21a0d68bb1e56dc805944e3654d6f https://git.kernel.org/stable/c/4bd2b89f4028f250dd1c1625eb3da1979b04a5e8 https://git.kernel.org/stable/c/2e2a720766886190a6d35c116794693aabd332b6