{"id":"CVE-2025-21959","published":"2025-04-01T15:46:57Z","modified":"2026-11-10T12:35:35Z","title":"netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()\n\nSince commit b36e4523d4d5 (\"netfilter: nf_conncount: fix garbage\ncollection confirm race\"), `cpu` and `jiffies32` were introduced to\nthe struct nf_conncount_tuple.\n\nThe commit made nf_conncount_add() initialize `conn->cpu` and\n`conn->jiffies32` when allocating the struct.\nIn contrast, count_tree() was not changed to initialize them.\n\nBy commit 34848d5c896e (\"netfilter: nf_conncount: Split insert and\ntraversal\"), count_tree() was split and the relevant allocation\ncode now resides in insert_tree().\nInitialize `conn->cpu` and `conn->jiffies32` in insert_tree().\n\nBUG: KMSAN: uninit-value in find_or_evict net/netfilter/nf_conncount.c:117 [inline]\nBUG: KMSAN: uninit-value in __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143\n find_or_evict net/netfilter/nf_conncount.c:117 [inline]\n __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143\n count_tree net/netfilter/nf_conncount.c:438 [inline]\n nf_conncount_count+0x82f/0x1e80 net/netfilter/nf_conncount.c:521\n connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72\n __nft_match_eval net/netfilter/nft_compat.c:403 [inline]\n nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433\n expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline]\n nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288\n nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23\n nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]\n nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626\n nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663\n NF_HOOK_LIST include/linux/netfilter.h:350 [inline]\n ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633\n ip_list_rcv+0x9ef/0xa40 net/ipv4/ip_input.c:669\n __netif_receive_skb_list_ptype net/core/dev.c:5936 [inline]\n __netif_receive_skb_list_core+0x15c5/0x1670 net/core/dev.c:5983\n __netif_receive_skb_list net/core/dev.c:6035 [inline]\n netif_receive_skb_list_internal+0x1085/0x1700 net/core/dev.c:6126\n netif_receive_skb_list+0x5a/0x460 net/core/dev.c:6178\n xdp_recv_frames net/bpf/test_run.c:280 [inline]\n xdp_test_run_batch net/bpf/test_run.c:361 [inline]\n bpf_test_run_xdp_live+0x2e86/0x3480 net/bpf/test_run.c:390\n bpf_prog_test_run_xdp+0xf1d/0x1ae0 net/bpf/test_run.c:1316\n bpf_prog_test_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407\n __sys_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813\n __do_sys_bpf kernel/bpf/syscall.c:5902 [inline]\n __se_sys_bpf kernel/bpf/syscall.c:5900 [inline]\n __ia32_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900\n ia32_sys_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls_32.h:358\n do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]\n __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:387\n do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:412\n do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:450\n entry_SYSENTER_compat_after_hwframe+0x84/0x8e\n\nUninit was created at:\n slab_post_alloc_hook mm/slub.c:4121 [inline]\n slab_alloc_node mm/slub.c:4164 [inline]\n kmem_cache_alloc_noprof+0x915/0xe10 mm/slub.c:4171\n insert_tree net/netfilter/nf_conncount.c:372 [inline]\n count_tree net/netfilter/nf_conncount.c:450 [inline]\n nf_conncount_count+0x1415/0x1e80 net/netfilter/nf_conncount.c:521\n connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72\n __nft_match_eval net/netfilter/nft_compat.c:403 [inline]\n nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433\n expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline]\n nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288\n nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23\n nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]\n nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626\n nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663\n NF_HOOK_LIST include/linux/netfilter.h:350 [inline]\n ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633\n ip_list_rcv+0x9ef/0xa40 net/ip\n---truncated---","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00624,"percentile":0.44236,"provenance":"source"},"cwes":[{"id":"CWE-908","name":"Use of Uninitialized Resource"}],"references":[{"url":"https://git.kernel.org/stable/c/f522229c5563b59b4240261e406779bba6754159","tags":[]},{"url":"https://git.kernel.org/stable/c/2a154ce766b995494e88d8d117fa82cc6b73dd87","tags":[]},{"url":"https://git.kernel.org/stable/c/e8544a5a97bee3674e7cd6bf0f3a4af517fa9146","tags":[]},{"url":"https://git.kernel.org/stable/c/a62a25c6ad58fae997f48a0749afeda1c252ae51","tags":[]},{"url":"https://git.kernel.org/stable/c/fda50302a13701d47fbe01e1739c7a51114144fb","tags":[]},{"url":"https://git.kernel.org/stable/c/db1e0c0856821c59a32ea3af79476bf20a6beeb2","tags":[]},{"url":"https://git.kernel.org/stable/c/2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc","tags":[]},{"url":"https://git.kernel.org/stable/c/d653bfeb07ebb3499c403404c21ac58a16531607","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":8.85},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < f522229c5563b59b4240261e406779bba6754159",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < 2a154ce766b995494e88d8d117fa82cc6b73dd87",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < e8544a5a97bee3674e7cd6bf0f3a4af517fa9146",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < a62a25c6ad58fae997f48a0749afeda1c252ae51",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < fda50302a13701d47fbe01e1739c7a51114144fb",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < db1e0c0856821c59a32ea3af79476bf20a6beeb2",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < 2db5baaf047a7c8d6ed5e2cc657b7854e155b7fc",">= b36e4523d4d56e2595e28f16f6ccf1cd6a9fc452, < d653bfeb07ebb3499c403404c21ac58a16531607","75af3d78168e654a5cd8bbc4c774f97be836165f",">= 4.14.92, < 4.15"]},{"vendor":"Linux","product":"Linux","versions":["4.18"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-01T17:15:56.023953Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-9361","exploited":false,"provenance":"source"}}