KernelScan.io

CRITICAL

netfilter Expectation UAF

CVE-2026-80668

CVSS 9.8 / 10.0 NVD

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

KernelScan AI8.1HIGH

01

In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_expect: use conntrack GC to reap expectations This patch replaces the timer API by GC worker approach for expectations, as it already happened in many other subsystems. Use the existing conntrack GC worker to iterate over the local list of expectations in the master conntrack to reap expired expectations. Check IPS_HELPER_BIT to run GC for expectations, set it on for nft_ct expectation which nevers sets it. Hold the expectation spinlock while iterating over the master conntrack expectation list to synchronize with nf_ct_remove_expectations(). This also performs runtime packet path garbage collection through the expectation insertion and lookup functions while walking over one of the chains of the global expectation hashtables. Unconfirmed conntrack entries are skipped since ct->ext can be reallocated and dying are skipped since those will be gone soon. Set on IPS_HELPER_BIT if the helper ct extension is added, then the new GC worker does not need to bump the ct refcount to check if the ct->ext helper is available. This removes the extra bump on the refcount for expectation timers, this allows to remove several nf_ct_expect_put() calls after the unlink, after this update only refcount remains at 1 while on the expectation hashes. This patch implicitly addresses a race with the existing timer API allowing an expectation to access a stale exp->master pointer which has been already released when expectation removal loses races with an expiring timer, ie. timer_del() reporting false. Add a new NF_CT_EXPECT_DEAD flag to reap this expectation via GC. This is needed by nf_conntrack_unexpect_related() which is called in error paths to invalidate newly created expectations that has been added into the hashes. These expectactions cannot be inmediately released as GC or nf_ct_remove_expectations() could race to make it. On expectation insert, the runtime GC reaps stale expectations before checking the expectation limit set by policy. Set current timestamp in nf_ct_expect_alloc(), then add the expectation policy timeout (or custom timeout specified added on top of this) to specify the expectation lifetime.

02

Engine v0.6.0

Risk summary

A race condition in the netfilter conntrack expectation subsystem allows a timer callback to access a stale pointer to an already-freed master conntrack object. An attacker sending network traffic through a firewall or router with conntrack helpers enabled (SIP, H323, FTP, etc.) can trigger this race, potentially leading to kernel memory corruption, information disclosure, or denial of service.

Affectednet/netfilter/nf_conntrack_expect.c (netfilter conntrack expectation)

Vulnerability analysis

The conntrack expectation subsystem used per-expectation timers to reap expired expectations. When expectation removal (triggered by master conntrack teardown or ctnetlink operations) raced with a concurrently firing timer, the timer callback could dereference a pointer to the master conntrack that had already been freed, resulting in a use-after-free. The fix replaces the entire timer-based approach with a garbage collection worker that reaps expired expectations while holding the expectation spinlock, eliminating the race window entirely. A new dead-flag mechanism allows safe deferred reaping of expectations invalidated in error paths. The vulnerable code path is reachable by any network traffic that triggers conntrack helper processing on a device acting as a firewall or router, requiring no privileges from the remote attacker, though the specific helpers must be configured and active.

03

BranchIntroducedFixed inPatch commit
6.16.1.1766.27ec786f4230c
6.126.12.946.12.11402f7809a19fc
6.186.18.246.19b8b09dc2bf35
6.196.19.146.20—
6.66.6.1436.6.1603d7b808ec352
7.1—7.1.5—
mainline—7.2—

04

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

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 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)