Vulnerability · Published Apr 1, 2025 · Assigned by Linux
CVE-2025-21959netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()
High 7.3
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 39% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.133-1 | DEBIAN-CVE-2025-21959 |
| Debian:13 | linux | 6.12.20-1 | DEBIAN-CVE-2025-21959 |
| Debian:14 | linux | 6.12.20-1 | DEBIAN-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux | 5.15.0-142.152 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux | 5.15.0-142.152 | USN-7591-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-84.84 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1086.93 | USN-7591-4 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1086.93 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1039.41 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1039.41~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1091.100 | USN-7597-1 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1091.100 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1038.44 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1018.18~24.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1036.42~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1091.100.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1025.27 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1085.94 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1085.94 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1040.42 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1016.16~24.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1040.42~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1083.89 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1083.89 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1036.40 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1068.76 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1068.76 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1023.25 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-28.28~24.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-85.85~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1078.81 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1078.81 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1037.37 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1037.37~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1081.87 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1081.87 | USN-7591-5 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1082.87 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1082.87 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-142.152 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-142.152 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-84.84.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1015.16~24.04.2 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-84.84.1~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1080.81 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1080.81 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1039.42 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1012.12 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1039.42~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1039.42.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1039.39 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1039.39 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1010.10 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1028.28 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1028.28 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1024.24 | USN-7606-1 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1024.24 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1083.89 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1083.89 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1037.38 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1037.38~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1080.83 | USN-7591-6 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1080.83 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1039.43 | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-84.84~22.04.1 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21959 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1018.19 | UBUNTU-CVE-2025-21959 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1050.54 | UBUNTU-CVE-2025-21959 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before f522229c5563b59b4240261e406779bba6754159b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before 2a154ce766b995494e88d8d117fa82cc6b73dd87b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before e8544a5a97bee3674e7cd6bf0f3a4af517fa9146b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before a62a25c6ad58fae997f48a0749afeda1c252ae51b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before fda50302a13701d47fbe01e1739c7a51114144fbb36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before db1e0c0856821c59a32ea3af79476bf20a6beeb2b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fcb36e4523d4d56e2595e28f16f6ccf1cd6a9fc452 – before d653bfeb07ebb3499c403404c21ac58a16531607 |
| Linux | Linux | 4.18 |
Weakness: CWE-908 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- https://git.kernel.org/stable/c/f522229c5563b59b4240261e406779bba6754159
- https://git.kernel.org/stable/c/2a154ce766b995494e88d8d117fa82cc6b73dd87
- https://git.kernel.org/stable/c/e8544a5a97bee3674e7cd6bf0f3a4af517fa9146
- https://git.kernel.org/stable/c/a62a25c6ad58fae997f48a0749afeda1c252ae51
- https://git.kernel.org/stable/c/fda50302a13701d47fbe01e1739c7a51114144fb
- https://git.kernel.org/stable/c/db1e0c0856821c59a32ea3af79476bf20a6beeb2
- https://git.kernel.org/stable/c/2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc
- https://git.kernel.org/stable/c/d653bfeb07ebb3499c403404c21ac58a16531607
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html