CVE-2026-143368: netfilter: nft_reject: prevent unbounded recursion in output hooks
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftreject: prevent unbounded recursion in output hooks
nftables payload-mangling rules can rewrite packet contents (such as TCP flags) before they are evaluated by reject targets. This defeats the content-based loop guards, allowing unbounded hook recursion that leads to kernel stack exhaustion and panics.
Fix this by extracting the per-CPU xmit recursion limit previously used by the netdev duplication/forwarding paths into a shared header, and apply it to the inet and inet6 reject transmit functions. It disables BH while transmitting the skb to address a possible migration to different CPU leading to imbalanced decrementation of the recursion counters.
Note that the devqueuexmit() path used when CONFIGBRIDGENETFILTER is enabled does not require this recursion guard. In that scenario, the generated reset packet is transmitted directly at Layer 2. Because the packet egresses from a different hook, it cannot synchronously loop. In addition nfsendunreach() and nfsendunreach6() are safe as the ICMP transmit functions are protected against recursion by the icmpxmitlock() and icmpv6xmitlock() guards.
Affected Software
Event History
Frequently Asked Questions
What rule configuration is needed to trigger the issue?
The issue requires nftables payload-mangling rules that alter packet contents before reject targets evaluate them, in an output-hook path. Rewriting fields such as TCP flags can bypass content-based loop checks and allow recursive packet processing until the kernel stack is exhausted.
Are systems using bridge netfilter exposed through the same recursive path?
When CONFIG_BRIDGE_NETFILTER is enabled, the reject-generated reset packet uses dev_queue_xmit() and is sent directly at Layer 2 through a different egress hook. The provided data states that this path cannot synchronously loop and does not require this recursion guard.
What can be done before applying the fix?
Avoid or remove combinations of payload-mangling nftables rules and reject targets in output-hook processing. The supplied information does not identify another mitigation for the affected inet and inet6 reject transmit paths.