🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11885

[syzbot] [netfilter?] WARNING in xt_dnat_target_v2

#11885
From: syzbot
Date: Thu, 05 Nov 2026 21:17
139 lines
15771 bytes
Hello,

syzbot found the following issue on:

HEAD commit:    787268686c64 ipmr, ip6mr: queue netlink route queries out ..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
console output: https://syzkaller.appspot.com/x/log.txt?x=170b444e580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d30e1495ee3ac817
dashboard link: https://syzkaller.appspot.com/bug?extid=2e819f6641708bb6ab9d
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=108b444e580000

AI-generated root cause summary:
When an incoming TCP packet is rejected by an nftables reject rule
(nft_reject_ipv4_eval), nf_send_reset() creates a TCP RST reply and attaches the
original packet's conntrack entry via nf_ct_attach(), marking its ctinfo as
IP_CT_RELATED_REPLY. As the RST packet traverses the NF_INET_LOCAL_OUT hook,
nf_nat_ipv4_fn() passes it to nf_nat_inet_fn() because it is not an ICMP packet.
In nf_nat_inet_fn(), IP_CT_RELATED_REPLY falls through to evaluation of
uninitialized NAT mappings, executing rules in the LOCAL_OUT NAT chain. If the
chain includes an xtables DNAT target (evaluated via nft_compat),
xt_dnat_target_v2() triggers WARN_ON because its assertion checks only for
IP_CT_NEW or IP_CT_RELATED, omitting IP_CT_RELATED_REPLY.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=2e819f6641708bb6ab9d

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2e819f6641708bb6ab9d@syzkaller.appspotmail.com

------------[ cut here ]------------
!(ct != NULL && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED))
WARNING: net/netfilter/xt_nat.c:154 at xt_dnat_target_v2+0x97/0xc0 net/netfilter/xt_nat.c:153, CPU#0: syz-executor145/6031
Modules linked in:
CPU: 0 UID: 0 PID: 6031 Comm: syz-executor145 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
RIP: 0010:xt_dnat_target_v2+0x97/0xc0 net/netfilter/xt_nat.c:153
Code: 74 22 41 83 e7 07 41 83 c7 fd bf fe ff ff ff 44 89 fe e8 ac 1e 90 f7 41 83 ff fe 72 25 e8 91 19 90 f7 eb 09 e8 8a 19 90 f7 90 <0f> 0b 90 4c 89 f7 48 89 de ba 01 00 00 00 5b 41 5e 41 5f e9 21 17
RSP: 0018:ffffc90000006de0 EFLAGS: 00010246
RAX: ffffffff8a38fc64 RBX: ffff8880614cd418 RCX: ffff88807c979f40
RDX: 0000000000000100 RSI: 0000000000000100 RDI: 00000000fffffffe
RBP: ffffc90000006ed0 R08: 0000000000000100 R09: 0000000000000000
R10: ffffc900000070b0 R11: ffffffff8a38fbb0 R12: ffffffff919e5438
R13: 1ffff92000000dc4 R14: ffff8880247c8900 R15: 0000000000000001
FS:  0000555563505400(0000) GS:ffff88812361d000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe16ab8280 CR3: 0000000034dea000 CR4: 00000000003526f0
Call Trace:
 <IRQ>
 nft_target_eval_xt+0x1ad/0x2b0 net/netfilter/nft_compat.c:100
 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [inline]
 nft_do_chain+0x48d/0x1b10 net/netfilter/nf_tables_core.c:285
 nft_nat_do_chain+0x360/0x4b0 net/netfilter/nft_chain_nat.c:32
 nf_nat_inet_fn+0x5de/0xb50 net/netfilter/nf_nat_core.c:931
 nf_nat_ipv4_fn net/netfilter/nf_nat_proto.c:583 [inline]
 nf_nat_ipv4_local_fn+0x18c/0x570 net/netfilter/nf_nat_proto.c:738
 nf_hook_entry_hookfn include/linux/netfilter.h:165 [inline]
 nf_hook_slow+0xc5/0x220 net/netfilter/core.c:633
 nf_hook+0x22a/0x3a0 include/linux/netfilter.h:280
 __ip_local_out+0x558/0x6a0 net/ipv4/ip_output.c:120
 ip_local_out+0x2a/0x190 net/ipv4/ip_output.c:129
 nf_send_reset+0xd8d/0x1530 net/ipv4/netfilter/nf_reject_ipv4.c:339
 nft_reject_ipv4_eval+0xf6/0x230 net/ipv4/netfilter/nft_reject_ipv4.c:30
 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [inline]
 nft_do_chain+0x48d/0x1b10 net/netfilter/nf_tables_core.c:285
 nft_do_chain_ipv4+0x195/0x290 net/netfilter/nft_chain_filter.c:24
 nf_hook_entry_hookfn include/linux/netfilter.h:165 [inline]
 nf_hook_slow+0xc5/0x220 net/netfilter/core.c:633
 nf_hook include/linux/netfilter.h:280 [inline]
 NF_HOOK+0x21f/0x3c0 include/linux/netfilter.h:323
 __netif_receive_skb_one_core net/core/dev.c:6433 [inline]
 __netif_receive_skb net/core/dev.c:6546 [inline]
 process_backlog+0xa6b/0x18b0 net/core/dev.c:6897
 __napi_poll+0xaa/0x330 net/core/dev.c:7977
 napi_poll net/core/dev.c:8040 [inline]
 net_rx_action+0x61d/0xf50 net/core/dev.c:8197
 handle_softirqs+0x265/0x8d0 kernel/softirq.c:669
 do_softirq+0x77/0xd0 kernel/softirq.c:569
 </IRQ>
 <TASK>
 __local_bh_enable_ip+0x100/0x140 kernel/softirq.c:473
 local_bh_enable include/linux/bottom_half.h:33 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:923 [inline]
 __dev_queue_xmit+0x1efb/0x3920 net/core/dev.c:5121
 neigh_output include/net/neighbour.h:554 [inline]
 ip_finish_output2+0xc4b/0x10b0 net/ipv4/ip_output.c:236
 NF_HOOK_COND include/linux/netfilter.h:314 [inline]
 ip_output+0x29f/0x450 net/ipv4/ip_output.c:437
 __ip_queue_xmit+0x10df/0x1b10 net/ipv4/ip_output.c:533
 __tcp_transmit_skb+0x2d06/0x47b0 net/ipv4/tcp_output.c:1773
 tcp_transmit_skb net/ipv4/tcp_output.c:1790 [inline]
 tcp_connect+0x1a7e/0x4990 net/ipv4/tcp_output.c:4451
 tcp_v4_connect+0x1264/0x1b20 net/ipv4/tcp_ipv4.c:348
 __inet_stream_connect+0x28c/0xf50 net/ipv4/af_inet.c:684
 inet_stream_connect+0x66/0xa0 net/ipv4/af_inet.c:755
 connect_socket net/socket.c:2143 [inline]
 __sys_connect_file net/socket.c:2168 [inline]
 __sys_connect+0x316/0x450 net/socket.c:2185
 __do_sys_connect net/socket.c:2191 [inline]
 __se_sys_connect net/socket.c:2188 [inline]
 __x64_sys_connect+0x7a/0x90 net/socket.c:2188
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f81c24b2ff7
Code: 48 89 fa 4c 89 df e8 98 1d 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffe16aca280 EFLAGS: 00000202 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000555563505400 RCX: 00007f81c24b2ff7
RDX: 0000000000000010 RSI: 00007ffe16aca300 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00000000d2040002
R13: 00007f81c24eed50 R14: 00007ffe16aca300 R15: 00007f81c24ec06c
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Technical Details
Message-ID: <6aecf26b.382bd2ce.33e041.0002.GAE@google.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357605-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357605-linux-kernel-netdev=dewy.ru
From: syzbot+2e819f6641708bb6ab9d@syzkaller.appspotmail.com (syzbot)
Newsgroups: linux.kernel.netdev
Subject: [syzbot] [netfilter?] WARNING in xt_dnat_target_v2
Date: Thu, 05 Nov 2026 13:17:31 -0800
Organization: Usenet Network
Message-ID: <6aecf26b.382bd2ce.33e041.0002.GAE@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
	logging-data="3732758"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:1ARbh4BZz98iMazyWfy/pLmxkUA= sha256:QwLtB6ukJnWiAeymQeXlvriiBrv36R+CkmRx2MDqnEw=
	sha1:To61+TBZUDVwJFi21RLYUPyr/5w= sha256:W+Urcsq2jpsHo6BqThGuxR/VhftXlP4wzHyKAojXeo8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9C00B1130BB; Fri,  6 Nov 2026 00:18:21 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Status: No, score=-2.72 tagged_above=-9999 required=6.31
	tests=[FROM_LOCAL_HEX=0.331, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 9WsCAow2eaZV;
	Fri,  6 Nov 2026 00:18:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-357605-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=syzkaller.appspotmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 09AA51130B9; Fri,  6 Nov 2026 00:18:14 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 63155603035; Thu,  5 Nov 2026 21:17:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793913463;
	b=SdfLrGzudkNbHi9zesozhlZIDkdnc1d0bKUHn9S1dNN7thcJNveraZtgS2VZ7egtpPb8
	 ptySf97+ZDSjVT4rg3TIU+J2DdxfKEbirC0iPUxBXDH53Yb5hg8KuGFQz/0lv0yt3g0Vm
	 MIPmSDjQyCIIn2S4YnIvR/nOw/QviaIHzNV7Wg1SCZD/RY5CMejrKS/TzTM13O8gh8ryn
	 oEalPqlraGIKO9i5COjR0+1jxC7up3mmdy2A7NLFLa0lE/LJGs0eomBdRwRrsKoMK/Lvq
	 gtdLkDehFDlziO7rAwwiCvSKyLbhqdmbCMrux83dCq662lpY/hNDk8wvQykxmE3VfiA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793913463;
	h=X-Original-To:Received:DMARC-Filter:Received:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:X-Received:Date:X-Google-Appengine-App-Id:
	 X-Google-Appengine-App-Id-Alias:Message-ID:Subject:From:To:
	 Content-Type;
	bh=kKvT1WZP63DDiif92MikpmY+JmPHkMKG8ncW+5LMjTE=;
	b=LFqqMjt4LAVkj9jA+mNnJeHzIz16tBU+doCrqE559ocyzKhhlvqzHqdOi6bJCfICA7MB
	 J1wXWw65wLHyRioET+5Nyg4g4avHBir7DtQPimMPDJfw/ZHiAGb3fb1o2lI7ywRfssJW2
	 5LnrVQbdRPs0Cj+qNJ1AfsW4iHohtS/ZICa0V5a+M/RufTJM99MIITdKJwgz9uwOM2xeD
	 wNsPp6RNMRrNX69zbiDoVXV+8tLuM59iwZkUWA3zdkasVMejXCMLwMxrZVwdFd26eW2YZ
	 qFPQcrUx0guSdCoNPRmaI7E7gzAC+eHlhDJ901zyCmq6Obxi10w1RPl00wkBqsbCF8w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=fail header.from=syzkaller.appspotmail.com;
	spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 45547606D81C;
	Thu,  5 Nov 2026 21:17:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.199
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793913452;
	b=PPLfcFFKj4Pmr4D4bdhBofX1Mib3Ql1wv6GllgTppcgDyQgqKTUvDC+SiUPe7KPIqV/h
	 ISsKjo5ZJsKNPjlaLKyY0kKiPIp9ujF2cSn6TdDzExtEpHL7kYZmhFs2T8oo59C1+e3yI
	 hGuoS60rWtyaTUdLJxUAqBOcYswyLOUECX+tc2Kvn+mM8ElkfqCKxlstb5qT/HnjGQuX2
	 OBsiBDfo+5Pwnw1YR067+wKhbezWwfkQDErKbw07n7XGYU5Dzlr6FDsF5BHmOkE7c+a/p
	 t2nQ5Al3xecOQzlQc9WBgprjQxe0ZV9yVwazN8CTNY1WH0k+U392LFfft8/sIlAF/ow==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793913452;
	h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted:
	 X-Gm-Message-State:MIME-Version:X-Received:Date:
	 X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID:
	 Subject:From:To:Content-Type;
	bh=kKvT1WZP63DDiif92MikpmY+JmPHkMKG8ncW+5LMjTE=;
	b=mljm0Pr2JfebsxhcF0l8kylT2v7uUQMHWnnPCDZV43RKMzvboBZ8sTHwJstOs1Z+91J7
	 sFMchWhzrTjUNfXXoJSPLRTLEckPAhp0rUFCnAkdS3NqQZ8q02GuOWbFBT94qrheNxOOQ
	 3mU1EhwfUyZG/dK9Ukfq/gXgeM6azm6CHLvy6jwvleRSlElHoROvxsP5oi2TNGdND7GWz
	 tEmCNaU6OxpGU37xGKNYritP50zha+5aKN+9bgJE9xnvKBcXprHCebtLk90wSrlDMTbXj
	 3AmBcZ3qDdkQhKCLfXxr0EDz3QVahmFjNWOxBbh6UtU0zE5joKqIqJb83zeWLQi0tIw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=fail header.from=syzkaller.appspotmail.com;
	spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com;
	arc=none smtp.remote-ip=209.85.167.199
X-Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FBF7606A329
	for <netdev@vger.kernel.org>; Thu,  5 Nov 2026 21:17:32 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4FBF7606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
X-Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-4ab4f652f9bso1832763b6e.0
        for <netdev@vger.kernel.org>; Thu, 05 Nov 2026 13:17:31 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793913451; x=1794518251;
        h=content-type:to:from:subject:message-id:date:mime-version
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=kKvT1WZP63DDiif92MikpmY+JmPHkMKG8ncW+5LMjTE=;
        b=J2Snr+uIwFvM0NEFA3PEKDyQ+t7rRdQGM5oY79aCFtA+y0dD98W6UOikjw8UFPj9PL
         4HU01bJ7OJuoRvQ7ROrwgI292RiL7j76oE9EjjR7d5d4EPs/VXxN/Z8Mj6N0ZQzS0lKc
         orfRlN/BtyPbAE/pDcrsjxagNDI0ApDl84jSG2QNmtMNrtvyHDI9FysCpYGI1TujKfxv
         NDtyFXx0BOVWi2GU+ANGaW7SFFRO0kjzW7iNKGKV77hB+PsIVaGe1hI3hp6gGQ4Jr/mO
         jZbFYCm0TybkQQXy0Vgj6HNDxp35DsmVs9M8M6QOi3is0iPH4GDcKZ1BPmxLfUbp0M9y
         nEjg==
X-Forwarded-Encrypted: i=1; AKwUvByFNJabGc4KfwcjJvu15NZcgYrSrJF9TPWLUdUOojCA6+TUHeYw5Heo1VmQ5X1mKbc6RFqqPU4=@vger.kernel.org
X-Gm-Message-State: APuU4Z9Z8BLrREGA0eg3Z3gnsJBsRfByxXcOOWofKxN3BxTRLan+ET7X
	7sec8cuiaKB3Uvpv7/dyzbMSv1ix/aztQZU2DEabhNqH/3+KhNic95rS8bIDks8iEe2GJR9t9x1
	GVIzPjBz1txfkmxAJ55BoYBl/Vtk4ndaaKcQ0OFwvZa8hzltd6Ws//6xp6Po=
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Received: by 2002:a05:6808:1985:b0:55c:8ee:a9c4 with SMTP id
 5614622812f47-567e115e036mr383926b6e.43.1793913451254; Thu, 05 Nov 2026
 13:17:31 -0800 (PST)
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller