KernelScan.io

HIGH Introduced in 5.13

netfilter CtTimeout UAF

CVE-2026-97609

CVSS 7.0 / 10.0 NVD

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.4HIGH

01

In the Linux kernel, the following vulnerability has been resolved: netfilter: cttimeout: prevent UAF during module unload nf_ct_set_timeout() protects the timeout hook dereference and policy lookup with rcu_read_lock(). cttimeout_exit(), however, unregisters the per-net operations before it clears the hook. This allows the following interleaving: CPU 0 CPU 1 cttimeout_exit() nf_ct_set_timeout() unregister_pernet_subsys() rcu_read_lock() kfree(pernet) h = nf_ct_timeout_hook h->timeout_find_get() nfct_timeout_pernet() The hook still points to ctnl_timeout_find_get() when CPU 1 looks up the already freed per-net timeout list. KASAN reported: BUG: KASAN: slab-use-after-free in ctnl_timeout_find_get Read of size 8 by task poc/90 Call Trace: ctnl_timeout_find_get+0x271/0x2a0 [nfnetlink_cttimeout] nf_ct_set_timeout+0x7b/0x3c0 xt_ct_tg_check+0x724/0xb20 xt_check_target+0x234/0xa90 do_ipt_set_ctl+0x570/0x1270 Allocated by task 89: __kmalloc_noprof+0x16e/0x460 ops_init+0x6d/0x420 register_pernet_operations+0x2f6/0x670 Freed by task 91: kfree+0x131/0x390 ops_undo_list+0x3d4/0x730 unregister_pernet_operations+0x232/0x490 unregister_pernet_subsys+0x1c/0x30 cttimeout_exit+0x52/0x970 [nfnetlink_cttimeout] Clear the hook and wait for existing readers before unregistering the per-net operations. This blocks new policy lookups and ensures readers that observed the hook finish before the per-net storage is freed.

02

Engine v0.6.0

Risk summary

A local attacker with netfilter configuration privileges — obtainable by unprivileged users through user namespaces — can trigger a use-after-free in the connection tracking timeout subsystem by racing firewall rule installation with module unload. The freed kernel heap memory is presumed exploitable for arbitrary read and write, potentially enabling container escape or full kernel compromise. Exploitation requires hitting a narrow race window during module teardown but is reachable from containerized or multi-tenant environments.

Affectednet/netfilter/nfnetlink_cttimeout.c (netfilter)

Vulnerability analysis

The connection tracking timeout policy module frees its per-network namespace storage before clearing the global function pointer that other parts of the firewall framework use to look up timeout policies. During module unload, a concurrent thread installing a connection-tracking firewall rule can still observe the stale pointer, follow it into the module's lookup function, and dereference the already-freed namespace data — a use-after-free in kernel heap memory. The fix reorders the module's teardown sequence so the global hook pointer is cleared and all in-flight readers are allowed to finish before the per-namespace storage is freed, closing the race window. The vulnerable path is reachable locally by any user who can configure netfilter rules, which includes unprivileged processes operating inside a user namespace where they acquire the needed capability; exploitation additionally requires the timeout module to be in the process of being unloaded, making the race window narrow but reachable from a container or multi-tenant environment.

03

BranchIntroducedFixed inPatch commit
6.125.136.12.11273f353bec625
6.185.136.18.53a7fdd86c386b
6.65.136.6.160f664e0669982
7.25.137.2.71f69c570a73f
mainline5.137.3fec9b1de0d02
cip/6.125.136.12.112-cip3373f353bec625

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Affected — no CIP fix yet (latest 6.1.189-cip61)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)