# CVE-2025-21959: netfilter: nf\_conncount: Fully initialize struct nf\_conncount\_tuple in insert\_tree()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.62% (percentile 44, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2025-04-01T15:46:57.775Z
- **Modified:** 2026-11-10T13:17:40.030Z

## Who should check

- Anyone running Linux \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< f522229c5563b59b4240261e406779bba6754159; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2a154ce766b995494e88d8d117fa82cc6b73dd87; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< e8544a5a97bee3674e7cd6bf0f3a4af517fa9146; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< a62a25c6ad58fae997f48a0749afeda1c252ae51; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< fda50302a13701d47fbe01e1739c7a51114144fb; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< db1e0c0856821c59a32ea3af79476bf20a6beeb2; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< d653bfeb07ebb3499c403404c21ac58a16531607; 75af3d78168e654a5cd8bbc4c774f97be836165f; \>= 4.14.92, \< 4.15
- Anyone running Linux 4.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf\_conncount: Fully initialize struct nf\_conncount\_tuple in insert\_tree()

Since commit b36e4523d4d5 ("netfilter: nf\_conncount: fix garbage
collection confirm race"), \`cpu\` and \`jiffies32\` were introduced to
the struct nf\_conncount\_tuple.

The commit made nf\_conncount\_add() initialize \`conn-\>cpu\` and
\`conn-\>jiffies32\` when allocating the struct.
In contrast, count\_tree() was not changed to initialize them.

By commit 34848d5c896e ("netfilter: nf\_conncount: Split insert and
traversal"), count\_tree() was split and the relevant allocation
code now resides in insert\_tree().
Initialize \`conn-\>cpu\` and \`conn-\>jiffies32\` in insert\_tree().

BUG: KMSAN: uninit-value in find\_or\_evict net/netfilter/nf\_conncount.c:117 \[inline\]
BUG: KMSAN: uninit-value in \_\_nf\_conncount\_add+0xd9c/0x2850 net/netfilter/nf\_conncount.c:143
 find\_or\_evict net/netfilter/nf\_conncount.c:117 \[inline\]
 \_\_nf\_conncount\_add+0xd9c/0x2850 net/netfilter/nf\_conncount.c:143
 count\_tree net/netfilter/nf\_conncount.c:438 \[inline\]
 nf\_conncount\_count+0x82f/0x1e80 net/netfilter/nf\_conncount.c:521
 connlimit\_mt+0x7f6/0xbd0 net/netfilter/xt\_connlimit.c:72
 \_\_nft\_match\_eval net/netfilter/nft\_compat.c:403 \[inline\]
 nft\_match\_eval+0x1a5/0x300 net/netfilter/nft\_compat.c:433
 expr\_call\_ops\_eval net/netfilter/nf\_tables\_core.c:240 \[inline\]
 nft\_do\_chain+0x426/0x2290 net/netfilter/nf\_tables\_core.c:288
 nft\_do\_chain\_ipv4+0x1a5/0x230 net/netfilter/nft\_chain\_filter.c:23
 nf\_hook\_entry\_hookfn include/linux/netfilter.h:154 \[inline\]
 nf\_hook\_slow+0xf4/0x400 net/netfilter/core.c:626
 nf\_hook\_slow\_list+0x24d/0x860 net/netfilter/core.c:663
 NF\_HOOK\_LIST include/linux/netfilter.h:350 \[inline\]
 ip\_sublist\_rcv+0x17b7/0x17f0 net/ipv4/ip\_input.c:633
 ip\_list\_rcv+0x9ef/0xa40 net/ipv4/ip\_input.c:669
 \_\_netif\_receive\_skb\_list\_ptype net/core/dev.c:5936 \[inline\]
 \_\_netif\_receive\_skb\_list\_core+0x15c5/0x1670 net/core/dev.c:5983
 \_\_netif\_receive\_skb\_list net/core/dev.c:6035 \[inline\]
 netif\_receive\_skb\_list\_internal+0x1085/0x1700 net/core/dev.c:6126
 netif\_receive\_skb\_list+0x5a/0x460 net/core/dev.c:6178
 xdp\_recv\_frames net/bpf/test\_run.c:280 \[inline\]
 xdp\_test\_run\_batch net/bpf/test\_run.c:361 \[inline\]
 bpf\_test\_run\_xdp\_live+0x2e86/0x3480 net/bpf/test\_run.c:390
 bpf\_prog\_test\_run\_xdp+0xf1d/0x1ae0 net/bpf/test\_run.c:1316
 bpf\_prog\_test\_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407
 \_\_sys\_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813
 \_\_do\_sys\_bpf kernel/bpf/syscall.c:5902 \[inline\]
 \_\_se\_sys\_bpf kernel/bpf/syscall.c:5900 \[inline\]
 \_\_ia32\_sys\_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900
 ia32\_sys\_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls\_32.h:358
 do\_syscall\_32\_irqs\_on arch/x86/entry/common.c:165 \[inline\]
 \_\_do\_fast\_syscall\_32+0xb0/0x110 arch/x86/entry/common.c:387
 do\_fast\_syscall\_32+0x38/0x80 arch/x86/entry/common.c:412
 do\_SYSENTER\_32+0x1f/0x30 arch/x86/entry/common.c:450
 entry\_SYSENTER\_compat\_after\_hwframe+0x84/0x8e

Uninit was created at:
 slab\_post\_alloc\_hook mm/slub.c:4121 \[inline\]
 slab\_alloc\_node mm/slub.c:4164 \[inline\]
 kmem\_cache\_alloc\_noprof+0x915/0xe10 mm/slub.c:4171
 insert\_tree net/netfilter/nf\_conncount.c:372 \[inline\]
 count\_tree net/netfilter/nf\_conncount.c:450 \[inline\]
 nf\_conncount\_count+0x1415/0x1e80 net/netfilter/nf\_conncount.c:521
 connlimit\_mt+0x7f6/0xbd0 net/netfilter/xt\_connlimit.c:72
 \_\_nft\_match\_eval net/netfilter/nft\_compat.c:403 \[inline\]
 nft\_match\_eval+0x1a5/0x300 net/netfilter/nft\_compat.c:433
 expr\_call\_ops\_eval net/netfilter/nf\_tables\_core.c:240 \[inline\]
 nft\_do\_chain+0x426/0x2290 net/netfilter/nf\_tables\_core.c:288
 nft\_do\_chain\_ipv4+0x1a5/0x230 net/netfilter/nft\_chain\_filter.c:23
 nf\_hook\_entry\_hookfn include/linux/netfilter.h:154 \[inline\]
 nf\_hook\_slow+0xf4/0x400 net/netfilter/core.c:626
 nf\_hook\_slow\_list+0x24d/0x860 net/netfilter/core.c:663
 NF\_HOOK\_LIST include/linux/netfilter.h:350 \[inline\]
 ip\_sublist\_rcv+0x17b7/0x17f0 net/ipv4/ip\_input.c:633
 ip\_list\_rcv+0x9ef/0xa40 net/ip
---truncated---

## Affected and fixed versions

- Linux: \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< f522229c5563b59b4240261e406779bba6754159; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2a154ce766b995494e88d8d117fa82cc6b73dd87; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< e8544a5a97bee3674e7cd6bf0f3a4af517fa9146; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< a62a25c6ad58fae997f48a0749afeda1c252ae51; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< fda50302a13701d47fbe01e1739c7a51114144fb; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< db1e0c0856821c59a32ea3af79476bf20a6beeb2; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< d653bfeb07ebb3499c403404c21ac58a16531607; 75af3d78168e654a5cd8bbc4c774f97be836165f; \>= 4.14.92, \< 4.15 (cvelist)
- Linux: 4.18 (cvelist)

## Mitigation

- Upgrade Linux to 4.15 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21959. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21959.md
Affected: Linux >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < f522229c5563b59b4240261e406779bba6754159; >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < 2a154ce766b995494e88d8d117fa82cc6b73dd87; >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < e8544a5a97bee3674e7cd6bf0f3a4af517fa9146; >= b36e4523d4d56e2595e28f1…
Fixed in: Linux 2a154ce766b995494e88d8d117fa82cc6b73dd87, Linux 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc, Linux 4.15

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21959 being exploited?

There is no confirmed exploitation: CVE-2025-21959 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.62% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21959?

High: CVSS 7.3 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-21959?

Linux \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< f522229c5563b59b4240261e406779bba6754159; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2a154ce766b995494e88d8d117fa82cc6b73dd87; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< e8544a5a97bee3674e7cd6bf0f3a4af517fa9146; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< a62a25c6ad58fae997f48a0749afeda1c252ae51; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< fda50302a13701d47fbe01e1739c7a51114144fb; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< db1e0c0856821c59a32ea3af79476bf20a6beeb2; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc; \>= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, \< d653bfeb07ebb3499c403404c21ac58a16531607; 75af3d78168e654a5cd8bbc4c774f97be836165f; \>= 4.14.92, \< 4.15; Linux 4.18.

### Is there a fix for CVE-2025-21959?

Yes. Fixed in Linux 2a154ce766b995494e88d8d117fa82cc6b73dd87, Linux 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc, Linux 4.15. Upgrade Linux to 4.15 or later.

### How do I check if I'm affected by CVE-2025-21959?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/f522229c5563b59b4240261e406779bba6754159>
- patch: <https://git.kernel.org/stable/c/2a154ce766b995494e88d8d117fa82cc6b73dd87>
- patch: <https://git.kernel.org/stable/c/e8544a5a97bee3674e7cd6bf0f3a4af517fa9146>
- patch: <https://git.kernel.org/stable/c/a62a25c6ad58fae997f48a0749afeda1c252ae51>
- patch: <https://git.kernel.org/stable/c/fda50302a13701d47fbe01e1739c7a51114144fb>
- patch: <https://git.kernel.org/stable/c/db1e0c0856821c59a32ea3af79476bf20a6beeb2>
- patch: <https://git.kernel.org/stable/c/2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc>
- patch: <https://git.kernel.org/stable/c/d653bfeb07ebb3499c403404c21ac58a16531607>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21959>

HTML: <https://flawdb.com/CVE-2025-21959> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21959>
