CVE-2026-53267: Linux Kernel Netfilter nft_ct Stack Overflow Vulnerability
A flaw in the Linux kernel's netfilter connection tracking (nft_ct) module allows a local attacker with unprivileged access to write code to kernel memory and crash the system. The issue occurs when firewall rules interact with template connection tracking objects in an unexpected way, causing a memory copy operation to overflow its bounds and corrupt adjacent kernel memory structures. The vulnerability requires local access and the ability to create firewall rules, but doesn't require elevated privileges to trigger.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-674
- Affected products
- 7 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-07-08
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_ct: bail out on template ct in get eval I noticed this issue while looking at a historic syzbot report [1]. A rule like the one below is enough to trigger the bug: table ip t { chain pre { type filter hook prerouting priority raw; ct zone set 1 ct original saddr 1.2.3.4 accept } } The first expression attaches a per-cpu template ct via nft_ct_set_zone_eval() (nf_ct_tmpl_alloc -> kzalloc, tuple is all zero, nf_ct_l3num(ct) == 0). The next expression then calls nft_ct_get_eval() on the same skb, treats the template as a real ct and hits the 16-byte memcpy path. With dreg at NFT_REG32_15 this overflows past struct nft_regs on the kernel stack; with smaller dreg values it silently clobbers adjacent registers. Reject template ct at the eval entry and in nft_ct_get_fast_eval(), mirroring the check nft_ct_set_eval() already has. Additionally, bound the address copy in NFT_CT_SRC / NFT_CT_DST by priv->len instead of by nf_ct_l3num(ct): nf_ct_get_tuple() zeroes the tuple before pkt_to_tuple() fills in only the protocol-relevant leading bytes, so the trailing bytes of tuple->{src,dst}.u3.all are well-defined zero. priv->len is validated at rule load, so the copy size is now bounded by the destination register rather than by an untrusted field on the conntrack. [1]: https://syzkaller.appspot.com/bug?id=389cf09cb72926114fce90dc85a2c3231dcb647c
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-53267 is a stack buffer overflow in the netfilter nft_ct subsystem affecting rule evaluation. The vulnerability stems from improper handling of per-CPU template connection tracking objects allocated via nft_ct_set_zone_eval(). When a template conntrack (with l3num==0) is passed to nft_ct_get_eval(), the code performs a 16-byte memcpy from the template's tuple address field without proper bounds checking. By placing the destination register (dreg) at NFT_REG32_15, an attacker can overflow past the nft_regs structure on the kernel stack. The fix involves: (1) adding explicit template conntrack rejection at eval entry and in nft_ct_get_fast_eval(), mirroring existing checks in nft_ct_set_eval(), and (2) bounding address copies by priv->len (validated at rule load time) rather than the untrusted nf_ct_l3num() field.
Business impact
Organizations running Linux systems with netfilter/nftables enabled face kernel crash and potential code execution risks. Systems used for firewalling, load balancing, or network policy enforcement are most exposed. The attack requires local system access and firewall rule creation capability, limiting exposure to containerized deployments, multi-tenant systems, and environments where unprivileged users can manage network policies. Denial of service via kernel panic is the primary concern; privilege escalation is theoretically possible depending on memory layout and exploitation sophistication.
Affected systems
All Linux kernel versions with the netfilter nft_ct module are affected. The vulnerability was identified through historical syzbot analysis and impacts any system running nftables for packet filtering or conntrack management. This includes standard Linux distributions with CONFIG_NF_TABLES enabled, containerized environments with network policy enforcement, and network appliances based on Linux kernels. Specific patched versions should be verified against vendor advisories.
Exploitability
The vulnerability requires local system access and the ability to load netfilter rules—typically available to unprivileged local users on systems where nftables is user-accessible or where containerized workloads can define network policies. The trigger is deterministic: a specific sequence of firewall rules reliably causes the overflow. No authentication bypass is needed. However, practical exploitation to achieve code execution requires knowledge of kernel memory layout and register state prediction, making widespread automated exploitation less likely than denial-of-service attacks via deliberate kernel panic.
Remediation
Apply the kernel patch that adds template conntrack validation in nft_ct_get_eval() and nft_ct_get_fast_eval(), and bounds the address copy operation by priv->len. Patch details should be verified against your Linux distribution's security advisory. Interim mitigations include restricting firewall rule management to trusted users via capability-based access controls (CAP_NET_ADMIN), disabling user-namespace nftables access if not required, and isolating unprivileged workloads in containers with restricted network policy namespaces.
Patch guidance
Monitor your Linux distribution's security updates for kernel patches addressing CVE-2026-53267. The fix targets the netfilter subsystem and may be available as a backport to stable kernel branches. Verify patch applicability against your kernel version and distribution. Test patches in staging environments before production rollout, particularly on systems heavily reliant on nftables for runtime policy management. Kernel version bumps may be required depending on your distribution's update cadence.
Detection guidance
Detection focuses on preventing malicious rule injection and monitoring for kernel crashes. Implement audit logging for netfilter rule loading (auditctl rules for nftables/iptables commands). Monitor system logs for kernel stack overflow panics or BUG messages originating from nf_ct code paths. In containerized environments, track pod-level network policy mutations and restrict nftables access to privileged containers. Behavioral detection via watchdog timers for unexpected kernel panics can alert to exploitation attempts, though distinguishing CVE-2026-53267 from other kernel bugs requires log analysis.
Why prioritize this
This vulnerability merits urgent patching despite its local-access requirement. Stack buffer overflows in kernel code are high-impact due to memory corruption potential. The deterministic trigger, combined with nftables' increasing adoption in container networking and cloud infrastructure, increases practical risk. Organizations with user-accessible nftables or unprivileged network policy management should prioritize patches. Systems where firewall rule creation is restricted to administrators can defer patching slightly in favor of access control hardening.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects high impact (confidentiality, integrity, and availability all rated 'high') with low attack complexity and low privilege requirement, offset by the local attack vector. This aligns with the vulnerability's kernel memory corruption capability and deterministic exploitability, though practical weaponization requires local access. The score appropriately reflects risk to privilege-separated systems; defense-in-depth via access controls can reduce realized risk below the base score.
Frequently asked questions
Can this be exploited remotely?
No. CVE-2026-53267 requires local system access and the ability to load firewall rules, typically via unprivileged user access on systems where nftables is exposed to users or containers. It cannot be triggered over the network.
What's the difference between template conntrack objects and normal conntrack objects?
Template conntrack objects are per-CPU helper structures allocated during firewall rule evaluation to store temporary state (like conntrack zones). They have zeroed tuple fields and l3num==0. Normal conntrack objects represent actual network flows and have valid tuple data. The vulnerability occurs when template objects are mistakenly processed as real conntracks.
Does restricting firewall rule creation prevent exploitation?
Yes. Limiting nftables/iptables rule management to administrators (via CAP_NET_ADMIN restrictions) reduces exposure significantly. In container environments, restricting network policy definition to cluster-level administrators rather than pod-level users prevents unprivileged rule injection.
Will this patch affect firewall rule performance?
The patch adds a simple null check for template conntrack rejection and changes the bounds variable from nf_ct_l3num() to priv->len. Performance impact should be negligible—template rejection happens early in the eval path, avoiding unnecessary memory operations.
This analysis is based on the CVE-2026-53267 advisory and does not constitute exhaustive security assessment. Patch versions, distribution availability, and exploitation techniques are subject to change. Organizations should verify patch availability and applicability against their specific kernel versions and Linux distributions. SEC.co does not provide exploit code or step-by-step weaponization guidance. This vulnerability analysis is current as of the publication date; refer to vendor advisories for the latest remediation status and tested patch versions. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46149HIGHLinux Kernel SCSI Target Memory Disclosure & DoS Vulnerability
- CVE-2026-53202HIGHLinux Kernel Intel VPU Stack Buffer Overflow (CVSS 7.8)
- CVE-2026-46373HIGHSQLFluff DoS Vulnerability – Resource Exhaustion via Nested Queries
- CVE-2026-48502HIGHMessagePack for C# Stack Overflow in Timestamp Parsing
- CVE-2026-48506HIGHMessagePack for C# Recursive Bypass Denial of Service
- CVE-2026-48512HIGHMessagePack-CSharp JSON Recursion Denial-of-Service
- CVE-2026-48513HIGHMessagePack C# Union Deserialization Denial of Service
- CVE-2026-4870HIGHIBM Qiskit SDK Parser Denial-of-Service Vulnerability