MEDIUM 5.5

CVE-2026-53349: Linux Kernel Netfilter Dangling Pointer Denial of Service

A vulnerability in the Linux kernel's netfilter connection tracking system allows a dangling pointer to persist after NAT helper modules (such as H.323) are unloaded. When a pending network connection arrives after the module is removed, the kernel attempts to call code that no longer exists in memory, causing a crash. Triggering this requires the ability to remove kernel modules, limiting the threat to local attackers with elevated privileges, but the underlying issue—leaving stale pointers to freed code—represents a robustness problem that warrants timely patching.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
Affected products
8 configuration(s)
Published / Modified
2026-07-01 / 2026-07-22

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack: destroy stale expectfn expectations on unregister NAT helpers such as nf_nat_h323 store a raw pointer to module text in exp->expectfn (e.g. ip_nat_q931_expect). nf_ct_helper_expectfn_unregister() 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, init_conntrack() 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 nf_nat_h323, then connecting to the expected port: Oops: int3: 0000 [#1] SMP KASAN NOPTI RIP: 0010:0xffffffffa06102d1 init_conntrack.isra.0 (net/netfilter/nf_conntrack_core.c:1862) nf_conntrack_in (net/netfilter/nf_conntrack_core.c:2049) ipv4_conntrack_local (net/netfilter/nf_conntrack_proto.c:223) nf_hook_slow (net/netfilter/core.c:619) __ip_local_out (net/ipv4/ip_output.c:120) __tcp_transmit_skb (net/ipv4/tcp_output.c:1715) tcp_connect (net/ipv4/tcp_output.c:4374) tcp_v4_connect (net/ipv4/tcp_ipv4.c:345) __sys_connect (net/socket.c:2167) Modules linked in: nf_conntrack_h323 [last unloaded: nf_nat_h323] Reaching the dangling state requires CAP_SYS_MODULE 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 nf_ct_helper_expectfn_destroy(), 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 synchronize_rcu() is introduced. With the fix, the same reproducer runs to completion without the Oops.

6 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The Linux kernel's netfilter NAT helpers store raw function pointers in expectation table entries (exp->expectfn) that reference helper code. The nf_ct_helper_expectfn_unregister() function, invoked during module unload, only unlinks the callback descriptor without removing stale expectations that reference the helper being unloaded. If a matching network connection arrives after module removal, init_conntrack() dereferences the dangling pointer and jumps into freed module text. The fix introduces nf_ct_helper_expectfn_destroy(), which walks the expectation table at helper unload time, finds and destroys all expectations whose expectfn pointers match the descriptor being torn down, eliminating the dangling reference before the module code is freed.

Business impact

This vulnerability primarily affects systems running NAT helper modules (H.323, SIP, PPTP, etc.) that handle specialized protocol tracking. The practical impact is a kernel denial of service: when the specific sequence of conditions is met (module unload with pending expectations, followed by connection arrival), the kernel crashes and requires a reboot. Systems relying on continuous network availability—particularly those with dynamic protocol helper management—face service interruption. The requirement for CAP_SYS_MODULE privilege narrows the threat to local actors or those who can escalate privileges, but automated deployment environments that dynamically load/unload helpers warrant immediate attention.

Affected systems

All Linux kernel versions incorporating the vulnerable netfilter architecture are affected, specifically those using NAT helper modules including nf_nat_h323, nf_nat_sip, nf_nat_pptp, and similar helpers. The vulnerability manifests most readily in distributions that modularize these helpers separately from the core kernel. Systems with stable, static helper module loading (helpers never unloaded) have reduced practical risk, though the underlying defect remains. Embedded Linux systems, container orchestration platforms with kernel module hot-loading, and NAT gateway appliances are most exposed.

Exploitability

Exploitability is constrained by privilege requirements. An attacker must possess CAP_SYS_MODULE capability within the initial user namespace—effectively requiring root or a process with explicit SYS_MODULE capability—to unload the helper module. Crafting the crash further requires inducing a network connection matching the unloaded helper's protocol within a narrow window after unload. The vulnerability does not enable privilege escalation, code execution, or information disclosure; the only outcome is denial of service via kernel panic. This limits the threat model to local actors or those already possessing significant system compromise.

Remediation

Apply the upstream Linux kernel patch that adds the nf_ct_helper_expectfn_destroy() function and integrates it into the helper unregister path. The fix is incorporated into mainstream kernel trees following the published patch. Verify the patch release version from your distribution's advisory; most major distributions will backport this fix into their stable/long-term support branches. For systems unable to patch immediately, segregate or restrict root-equivalent access and audit for unnecessary or rarely-used NAT helper modules that can be permanently disabled at compile time.

Patch guidance

Obtain patches from your Linux distribution's security update channel. Upstream kernel patches for this vulnerability should be available in mainline releases shortly after publication. Verify the specific kernel version recommended for your distribution against the official security advisory; version numbering varies across distributions. Most users will receive updates through standard package managers (apt, yum, dnf, etc.). For embedded or custom kernels, reference the upstream netfilter subsystem patches in the kernel git repository. Testing in a non-production environment is recommended before deploying to production systems, particularly for builds relying on dynamic NAT helper modules.

Detection guidance

Look for kernel log entries indicating unhandled faults in init_conntrack() or references to freed module text, particularly in KASAN or SLUB builds where memory access violations are instrumented. Monitoring for unexpected kernel panics or system reboots following NAT helper module unload operations may indicate exploitation attempts or accidental trigger scenarios. Security Information and Event Management (SIEM) systems should flag CAP_SYS_MODULE use followed by module unload operations, especially in restricted environments. Systems with CONFIG_KASAN enabled will immediately surface the use-after-free; production systems without KASAN instrumentation may only register a kernel panic with minimal diagnostic output.

Why prioritize this

Although the CVSS score of 5.5 reflects local-only, privilege-restricted impact, this vulnerability warrants prompt patching because (1) it affects kernel stability and availability directly, (2) it represents a clear memory safety defect in a critical subsystem (netfilter), and (3) many NAT-heavy deployments (firewalls, gateways, container environments) rely on these helpers. The fix is non-invasive and introduces no performance overhead, making deployment low-risk. Prioritize systems running unstable or frequently-modified helper module configurations above systems with statically-loaded helpers.

Risk score, explained

The CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H score accurately reflects the attack surface: local attack vector, low complexity, low-privilege requirement, no user interaction, single system impact, and denial-of-service outcome (availability impact). The score does not assign points for code execution or privilege escalation, both absent from this defect. Organizations should weight this score against their own threat model; environments with strong local privilege boundaries and minimal untrusted local access can accept slightly higher risk, whereas shared hosting or container platforms should treat this as moderate-to-high priority.

Frequently asked questions

Can this be exploited remotely over the network?

No. The vulnerability requires CAP_SYS_MODULE capability, which is a local privilege. A remote attacker cannot unload kernel modules or trigger this defect without first compromising the local system or a privileged process running on it.

What happens if my system crashes due to this vulnerability?

The kernel panics and halts. Systems with automatic reboot-on-panic enabled will restart. There is no data corruption or persistent compromise; restarting restores normal operation until the same sequence of module unload and connection arrival recurs.

Do I need to unload NAT helpers for normal operation?

Most systems load NAT helpers once at boot and leave them resident. If your configuration never unloads these modules, the vulnerability window does not open, reducing urgency—but the underlying code defect still warrants patching at the next maintenance window.

Does this affect my system if I have never used H.323 or disabled NAT helpers?

No. The vulnerability only manifests if a NAT helper module (H.323, SIP, PPTP, etc.) is both loaded and subsequently unloaded while pending expectations exist. Permanently disabled or unloaded helpers pose no risk.

This analysis is based on the CVE description and upstream patch documentation as of the publication date. No exploit code, weaponized proof-of-concept, or attack tooling is provided or endorsed. Organizations should verify patch availability and version numbers against their distribution's official security advisories before deploying updates. The information provided does not constitute legal advice or a guarantee of security; organizations remain responsible for assessing risk within their specific environment and applying patches according to their change management procedures. Always test patches in non-production environments before production deployment. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).