HIGH
netfilter Helper UAF
CVE-2026-43027
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_helper: pass helper to expect cleanup nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy() to remove expectations belonging to the helper being unregistered. However, it passes NULL instead of the helper pointer as the data argument, so expect_iter_me() never matches any expectation and all of them survive the cleanup. After unregister returns, nfnl_cthelper_del() frees the helper object immediately. Subsequent expectation dumps or packet-driven init_conntrack() calls then dereference the freed exp->helper, causing a use-after-free. Pass the actual helper pointer so expectations referencing it are properly destroyed before the helper object is freed. BUG: KASAN: slab-use-after-free in string+0x38f/0x430 Read of size 1 at addr ffff888003b14d20 by task poc/103 Call Trace: string+0x38f/0x430 vsnprintf+0x3cc/0x1170 seq_printf+0x17a/0x240 exp_seq_show+0x2e5/0x560 seq_read_iter+0x419/0x1280 proc_reg_read+0x1ac/0x270 vfs_read+0x179/0x930 ksys_read+0xef/0x1c0 Freed by task 103: The buggy address is located 32 bytes inside of freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)
02KernelScan AI Analysis
Risk summary
Systems using netfilter connection tracking helpers are vulnerable to kernel memory corruption and information disclosure when helpers are dynamically unregistered. This affects firewalls, routers, NAT gateways, and multi-tenant systems where unprivileged users can obtain CAP_NET_ADMIN via user namespaces. The use-after-free can be triggered by expectation dumps or packet-driven connection tracking after helper unregistration.
Vulnerability analysis
The vulnerability occurs in nf_conntrack_helper_unregister() which fails to properly clean up connection expectations when unregistering a helper. By passing NULL instead of the helper pointer to nf_ct_expect_iterate_destroy(), expectations referencing the helper survive cleanup. When the helper object is subsequently freed by nfnl_cthelper_del(), these expectations contain dangling pointers that cause use-after-free when accessed during expectation dumps (e.g., /proc/net/nf_conntrack_expect) or new connection processing (init_conntrack()). The freed helper object is a 192-byte slab allocation; subsequent reads leak kernel heap contents (including potential pointer values), while further dereferences through the helper function pointers enable arbitrary kernel memory corruption. The fix ensures proper cleanup by passing the actual helper pointer so matching expectations are destroyed before the helper is freed.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.10 | 5.10.253 | 5cf28d5c8dcb |
| 5.15 | 5.15.203 | 504ba4168466 |
| 6.1 | 6.1.168 | dc1739eff48e |
| 6.12 | 6.12.81 | 2c16e4d64dd9 |
| 6.18 | 6.18.22 | 620f3d14c1ef |
| 6.19 | 6.19.12 | 90bd7e850134 |
| 6.6 | 6.6.134 | 2cf2737c85a2 |
| mainline | 7.0 | a242a9ae58aa |