On 11/28/26 23:01, Pablo Neira Ayuso wrote:
> On Fri, Nov 27, 2026 at 10:50:14AM +0000, syzbot wrote:
>> From: Krystian Kaniewski <krys…@gmail.com> >> >> nft_synproxy_eval_v4() and nft_synproxy_eval_v6() check tcp->syn and >> tcp->ack without excluding other TCP control flags, unlike the xtables >> SYNPROXY targets. As a result, a SYN+ACK (or SYN+FIN / SYN+RST) packet >> reaching nft_synproxy is misidentified as an initial client SYN and >> triggers another SYN+ACK reply, while FIN+ACK and RST+ACK packets enter the >> client ACK branch and can be dropped with NF_DROP instead of continuing >> through the ruleset. >> >> On loopback, when an nftables input rule evaluates nft_synproxy, a local >> SYN causes it to send a SYN+ACK back over loopback, which hits the same >> rule again and matches tcp->syn. This creates an infinite SYN+ACK feedback >> loop in softirq context that saturates the CPUs, starves tasks holding or >> waiting on rtnl_mutex, and triggers hung task warnings (such as "INFO: task >> kworker/R-ipv6_:60 blocked for more than 143 seconds" in >> addrconf_dad_work). >> >> Fix this in nft_synproxy_do_eval() by returning early when tcp->syn == >> tcp->ack || tcp->fin || tcp->rst before dispatching to >> nft_synproxy_eval_v4() or nft_synproxy_eval_v6(). This ensures nft_synproxy >> only handles a plain SYN or a plain ACK (without FIN or RST), while valid >> TCP segments outside the client handshake such as SYN+ACK, FIN+ACK, and >> RST+ACK—as well as other segments with FIN, RST, or neither SYN nor ACK >> set—continue through the ruleset unchanged with regs->verdict.code left as >> NFT_CONTINUE.
> > This patch is a duplicate, there is a patch to address this in the ML. >
Thanks, Pablo. I agree that this addresses the same bug as Nguyen's patch: https://lore.kernel.org/netfilter-devel/2026…@gmail.com/ I did not notice that posting before submitting this patch. Sorry for the duplicate. One difference is that this version enforces the protocol-independent TCP flag invariant once in nft_synproxy_do_eval(), before the IPv4 and IPv6 dispatch, instead of duplicating the same checks in both protocol helpers. This also prevents the two paths from diverging later. Would you prefer to fold that form into the existing patch? Otherwise, please disregard this submission as a duplicate.
-- Krystian Kaniewski