CVE-2025-21959 netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- Linux KernelUbuntuDebian
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---
Upgrade path
16 packages: 11 fixed, 5 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | >= V3.1.6; >= V3.1.7 | No fix listed | No fix yet |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | >= V3.1.6; >= V3.1.7 | No fix listed | No fix yet |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) | >= V3.1.6; >= V3.1.7 | No fix listed | No fix yet |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) | >= V3.1.6; >= V3.1.7 | No fix listed | No fix yet |
| Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) | >= V3.1.6; >= V3.1.7 | No fix listed | No fix yet |
| azure linux kernel(Azure Linux 3.0) | < 6.6.85.1-2 | 6.6.85.1-2 | Fixed |
| cbl-mariner kernel(CBL-Mariner 2.0) | < 5.15.180.1-1 | 5.15.180.1-1 | Fixed |
| debian/linux(Debian 12) | < 6.1.133-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +33 more | 6.1.133-1 | Fixed |
| debian/linux(Debian 13) | < 6.12.20-1 | 6.12.20-1 | Fixed |
| debian/linux(Debian 14) | < 6.12.20-1 | 6.12.20-1 | Fixed |
| Linux kernel | < 5.4.292; < 5.10.236; < 5.15.180; < 6.1.132 +28 more | 2a154ce766b995494e88d8d117fa82cc6b73dd87, 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc, 4.15, 5.4.292, 5.10.236, 5.15.180, 6.1.132, 6.6.84, 6.12.20, 6.13.8, 6.14, a62a25c6ad58fae997f48a0749afeda1c252ae51, d653bfeb07ebb3499c403404c21ac58a16531607, db1e0c0856821c59a32ea3af79476bf20a6beeb2, e8544a5a97bee3674e7cd6bf0f3a4af517fa9146, f522229c5563b59b4240261e406779bba6754159, fda50302a13701d47fbe01e1739c7a51114144fb | Fixed |
| ubuntu/linux(Ubuntu 22.04) | < 5.15.0-142.152 | 5.15.0-142.152 | Fixed |
| ubuntu/linux(Ubuntu 24.04) | < 6.8.0-84.84 | 6.8.0-84.84 | Fixed |
| ubuntu/linux-kvm(Ubuntu 22.04) | < 5.15.0-1082.87 | 5.15.0-1082.87 | Fixed |
| ubuntu/linux-raspi(Ubuntu 22.04) | < 5.15.0-1080.83 | 5.15.0-1080.83 | Fixed |
| ubuntu/linux-raspi(Ubuntu 24.04) | < 6.8.0-1039.43 | 6.8.0-1039.43 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux kernel(Azure Linux:3.0) | < 6.6.85.1-2 | 6.6.85.1-2 |
| cbl-mariner kernel(CBL-Mariner:2.0) | < 5.15.180.1-1 | 5.15.180.1-1 |
| debian/linux(Debian:12) | < 6.1.133-1 | 6.1.133-1 |
| debian/linux(Debian:12) | = 6.1.106-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.112-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.115-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.119-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.123-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.124-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.128-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.129-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.27-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.37-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.52-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.64-1 | No fix listed |
Show 63 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/linux(Debian:12) | = 6.1.66-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.67-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.82-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.85-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.98-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.99-1 | No fix listed |
| debian/linux(Debian:13) | < 6.12.20-1 | 6.12.20-1 |
| debian/linux(Debian:14) | < 6.12.20-1 | 6.12.20-1 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < f522229c5563b59b4240261e406779bba6754159 | f522229c5563b59b4240261e406779bba6754159 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < 2a154ce766b995494e88d8d117fa82cc6b73dd87 | 2a154ce766b995494e88d8d117fa82cc6b73dd87 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < e8544a5a97bee3674e7cd6bf0f3a4af517fa9146 | e8544a5a97bee3674e7cd6bf0f3a4af517fa9146 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < a62a25c6ad58fae997f48a0749afeda1c252ae51 | a62a25c6ad58fae997f48a0749afeda1c252ae51 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < fda50302a13701d47fbe01e1739c7a51114144fb | fda50302a13701d47fbe01e1739c7a51114144fb |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < db1e0c0856821c59a32ea3af79476bf20a6beeb2 | db1e0c0856821c59a32ea3af79476bf20a6beeb2 |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc | 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc |
| Linux kernel | >= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < d653bfeb07ebb3499c403404c21ac58a16531607 | d653bfeb07ebb3499c403404c21ac58a16531607 |
| Linux kernel | = 75af3d78168e654a5cd8bbc4c774f97be836165f | No fix listed |
| Linux kernel | >= 4.14.92, < 4.15 | 4.15 |
| Linux kernel | = 4.18 | No fix listed |
| Linux kernel | < 5.4.292 | 5.4.292 |
| Linux kernel | < 5.10.236 | 5.10.236 |
| Linux kernel | < 5.15.180 | 5.15.180 |
| Linux kernel | < 6.1.132 | 6.1.132 |
| Linux kernel | < 6.6.84 | 6.6.84 |
| Linux kernel | < 6.12.20 | 6.12.20 |
| Linux kernel | < 6.13.8 | 6.13.8 |
| Linux kernel | < 6.14 | 6.14 |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | >= V3.1.6 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | >= V3.1.7 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | >= V3.1.6 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | >= V3.1.7 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) | >= V3.1.6 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) | >= V3.1.7 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) | >= V3.1.6 | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) | >= V3.1.7 | No fix listed |
| Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) | >= V3.1.6 | No fix listed |
| Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) | >= V3.1.7 | No fix listed |
| ubuntu/linux(Ubuntu:22.04) | < 5.15.0-142.152 | 5.15.0-142.152 |
| ubuntu/linux-kvm(Ubuntu:22.04) | < 5.15.0-1082.87 | 5.15.0-1082.87 |
| ubuntu/linux-raspi(Ubuntu:22.04) | < 5.15.0-1080.83 | 5.15.0-1080.83 |
| ubuntu/linux(Ubuntu:24.04) | < 6.8.0-84.84 | 6.8.0-84.84 |
| ubuntu/linux-raspi(Ubuntu:24.04) | < 6.8.0-1039.43 | 6.8.0-1039.43 |
| Linux kernel | >= 4.18, < 5.4.292 | 5.4.292 |
| Linux kernel | >= 5.5, < 5.10.236 | 5.10.236 |
| Linux kernel | >= 5.11, < 5.15.180 | 5.15.180 |
| Linux kernel | >= 5.16, < 6.1.132 | 6.1.132 |
| Linux kernel | >= 6.2, < 6.6.84 | 6.6.84 |
| Linux kernel | >= 6.7, < 6.12.20 | 6.12.20 |
| Linux kernel | >= 6.13, < 6.13.8 | 6.13.8 |
| Linux kernel | = 6.14-rc1 | No fix listed |
| Linux kernel | = 6.14-rc2 | No fix listed |
| Linux kernel | = 6.14-rc3 | No fix listed |
| Linux kernel | = 6.14-rc4 | No fix listed |
| Linux kernel | = 6.14-rc5 | No fix listed |
| Linux kernel | = 6.14-rc6 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-21959 vendor-advisory
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- lists.debian.org
- lists.debian.org
- cert-portal.siemens.com
- cert-portal.siemens.com
- Ubuntu CVE tracker vendor-advisory
- USN-7585-1 vendor-advisory
- USN-7585-2 vendor-advisory
- USN-7591-1 vendor-advisory
- USN-7591-2 vendor-advisory
- USN-7591-3 vendor-advisory
- USN-7592-1 vendor-advisory
- USN-7593-1 vendor-advisory
- USN-7591-4 vendor-advisory
- USN-7597-1 vendor-advisory
- USN-7597-2 vendor-advisory
- USN-7598-1 vendor-advisory
- USN-7585-3 vendor-advisory
- USN-7585-4 vendor-advisory
- USN-7602-1 vendor-advisory
- USN-7585-5 vendor-advisory
- USN-7605-1 vendor-advisory
- USN-7606-1 vendor-advisory
- USN-7585-6 vendor-advisory
- USN-7591-5 vendor-advisory
- USN-7605-2 vendor-advisory
- USN-7628-1 vendor-advisory
- USN-7585-7 vendor-advisory
- USN-7640-1 vendor-advisory
- USN-7591-6 vendor-advisory
- USN-7655-1 vendor-advisory
- USN-7764-1 vendor-advisory
- USN-7765-1 vendor-advisory
- USN-7766-1 vendor-advisory
- USN-7767-1 vendor-advisory
- USN-7779-1 vendor-advisory
- USN-7767-2 vendor-advisory
- USN-7764-2 vendor-advisory
- USN-7790-1 vendor-advisory
- USN-7800-1 vendor-advisory
- USN-7801-1 vendor-advisory
- USN-7802-1 vendor-advisory
- USN-7801-2 vendor-advisory
- USN-7809-1 vendor-advisory
- USN-7801-3 vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2025-9361 third-party-advisory