CVE-2026-53349: netfilter: nf_conntrack: destroy stale expectfn expectations on unregister
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfconntrack: destroy stale expectfn expectations on unregister
NAT helpers such as nfnath323 store a raw pointer to module text in exp->expectfn (e.g. ipnatq931expect). nfcthelperexpectfnunregister() only unlinks the callback descriptor and never walks the expectation table, so an expectation pending at module removal survives with a dangling exp->expectfn into freed module text.
When the expected connection arrives, initconntrack() invokes exp->expectfn(), now a stale pointer into the unloaded module. Reproduced on a KASAN build by loading the H.323 helpers, creating a Q.931 expectation, unloading nfnath323, then connecting to the expected port:
Oops: int3: 0000 [#1] SMP KASAN NOPTI RIP: 0010:0xffffffffa06102d1 initconntrack.isra.0 (net/netfilter/nfconntrackcore.c:1862) nfconntrackin (net/netfilter/nfconntrackcore.c:2049) ipv4conntracklocal (net/netfilter/nfconntrackproto.c:223) nfhookslow (net/netfilter/core.c:619) iplocalout (net/ipv4/ipoutput.c:120) tcptransmitskb (net/ipv4/tcpoutput.c:1715) tcpconnect (net/ipv4/tcpoutput.c:4374) tcpv4connect (net/ipv4/tcpipv4.c:345) sysconnect (net/socket.c:2167) Modules linked in: nfconntrackh323 [last unloaded: nfnath323]
Reaching the dangling state requires CAPSYSMODULE in the initial user namespace to remove a NAT helper that still has live expectations, so this is a robustness fix; leaving an expectation pointing at freed text is wrong regardless.
Add nfcthelperexpectfndestroy(), which walks the expectation table and drops every expectation whose ->expectfn matches the descriptor being torn down. Call it from each NAT helper's exit path after the existing RCU grace period, so no expectation outlives the code it points at and no extra synchronizercu() is introduced. With the fix, the same reproducer runs to completion without the Oops.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.143.1-1 - Upgrade
Upgrade
Linux kernel netfilter nf_conntrackto a version that resolves this vulnerability.Patch netfilter: nf_conntrack: destroy stale expectfn expectations on unregister - Configuration
When unregistering an nf_conntrack helper (nf_ct_helper_expectfn_unregister()), add a synchronize_rcu() and call nf_ct_helper_expectfn_destroy() so it walks the expectation table and destroys every expectation whose ->expectfn matches the descriptor being torn down, preventing stale pointers into unloaded module text.
Linux kernel nf_conntrack / nf_conntrack helper unregister path synchronize_rcu() = introduced - Compensating control
On systems where CAP_SYS_MODULE can be granted to users, restrict/avoid granting CAP_SYS_MODULE to reduce the ability to unload NAT helpers while live expectations exist (vulnerability requires CAP_SYS_MODULE in the initial user namespace to reach the dangling state).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-53349?
CVE-2026-53349 has a risk score of 28, indicating it is a significant vulnerability in the Linux kernel.
How do I fix CVE-2026-53349?
To address CVE-2026-53349, ensure that your Linux kernel is updated to the latest version that includes the fix for this vulnerability.
What systems are affected by CVE-2026-53349?
CVE-2026-53349 affects systems running vulnerable versions of the Linux kernel that utilize the netfilter connection tracking feature.
What are the potential impacts of CVE-2026-53349?
The potential impacts of CVE-2026-53349 may include stability issues or exploitation opportunities in environments using netfilter NAT helpers.
What is the nature of CVE-2026-53349?
CVE-2026-53349 involves the improper management of stale expectations in netfilter's connection tracking for NAT helpers, leading to potential exploitation.