* [syzbot] [netfilter?] WARNING in nft_map_deactivate @ 2026-02-19 9:53 syzbot 2026-02-19 12:26 ` Pablo Neira Ayuso 0 siblings, 1 reply; 3+ messages in thread From: syzbot @ 2026-02-19 9:53 UTC (permalink / raw) To: coreteam, davem, edumazet, fw, horms, kuba, linux-kernel, netdev, netfilter-devel, pabeni, pablo, phil, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: 4c51f90d45dc selftests/bpf: Add powerpc support for get_pr.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=159e5aaa580000 kernel config: https://syzkaller.appspot.com/x/.config?x=6d9e410399043c26 dashboard link: https://syzkaller.appspot.com/bug?extid=4924a0edc148e8b4b342 compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13437652580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1250a7b2580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/173ab67d0a10/disk-4c51f90d.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/9c8787b7cc0e/vmlinux-4c51f90d.xz kernel image: https://storage.googleapis.com/syzbot-assets/bf9799a7764a/bzImage-4c51f90d.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+4924a0edc148e8b4b342@syzkaller.appspotmail.com R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fb5ea615fac R14: 00007fb5ea615fa0 R15: 00007fb5ea615fa0 </TASK> ------------[ cut here ]------------ iter.err WARNING: net/netfilter/nf_tables_api.c:845 at nft_map_deactivate+0x34e/0x3c0 net/netfilter/nf_tables_api.c:845, CPU#0: syz.0.17/5992 Modules linked in: CPU: 0 UID: 0 PID: 5992 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 RIP: 0010:nft_map_deactivate+0x34e/0x3c0 net/netfilter/nf_tables_api.c:845 Code: 8b 05 86 5a 4e 09 48 3b 84 24 a0 00 00 00 75 62 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc e8 63 6d fa f7 90 <0f> 0b 90 43 80 7c 35 00 00 0f 85 23 fe ff ff e9 26 fe ff ff 89 d9 RSP: 0018:ffffc900045af780 EFLAGS: 00010293 RAX: ffffffff89ca45bd RBX: 00000000fffffff4 RCX: ffff888028111e40 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc900045af870 R08: 0000000000400dc0 R09: 00000000ffffffff R10: dffffc0000000000 R11: fffffbfff1d141db R12: ffffc900045af7e0 R13: 1ffff920008b5f24 R14: dffffc0000000000 R15: ffffc900045af920 FS: 000055557a6a5500(0000) GS:ffff888125496000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb5ea271fc0 CR3: 000000003269e000 CR4: 00000000003526f0 Call Trace: <TASK> __nft_release_table+0xceb/0x11f0 net/netfilter/nf_tables_api.c:12115 nft_rcv_nl_event+0xc25/0xdb0 net/netfilter/nf_tables_api.c:12187 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:761 __sock_release net/socket.c:662 [inline] sock_close+0xc3/0x240 net/socket.c:1455 __fput+0x44f/0xa70 fs/file_table.c:469 fput_close_sync+0x11f/0x240 fs/file_table.c:574 __do_sys_close fs/open.c:1509 [inline] __se_sys_close fs/open.c:1494 [inline] __x64_sys_close+0x7e/0x110 fs/open.c:1494 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb5ea39c629 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff72e03568 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 00007fb5ea615fa0 RCX: 00007fb5ea39c629 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fff72e035d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fb5ea615fac R14: 00007fb5ea615fa0 R15: 00007fb5ea615fa0 </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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [netfilter?] WARNING in nft_map_deactivate 2026-02-19 9:53 [syzbot] [netfilter?] WARNING in nft_map_deactivate syzbot @ 2026-02-19 12:26 ` Pablo Neira Ayuso 2026-02-19 15:17 ` Florian Westphal 0 siblings, 1 reply; 3+ messages in thread From: Pablo Neira Ayuso @ 2026-02-19 12:26 UTC (permalink / raw) To: syzbot Cc: coreteam, davem, edumazet, fw, horms, kuba, linux-kernel, netdev, netfilter-devel, pabeni, phil, syzkaller-bugs On Thu, Feb 19, 2026 at 01:53:25AM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 4c51f90d45dc selftests/bpf: Add powerpc support for get_pr.. > git tree: bpf-next > console output: https://syzkaller.appspot.com/x/log.txt?x=159e5aaa580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=6d9e410399043c26 > dashboard link: https://syzkaller.appspot.com/bug?extid=4924a0edc148e8b4b342 > compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13437652580000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1250a7b2580000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/173ab67d0a10/disk-4c51f90d.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/9c8787b7cc0e/vmlinux-4c51f90d.xz > kernel image: https://storage.googleapis.com/syzbot-assets/bf9799a7764a/bzImage-4c51f90d.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+4924a0edc148e8b4b342@syzkaller.appspotmail.com > > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 > R13: 00007fb5ea615fac R14: 00007fb5ea615fa0 R15: 00007fb5ea615fa0 > </TASK> > ------------[ cut here ]------------ > iter.err > WARNING: net/netfilter/nf_tables_api.c:845 at nft_map_deactivate+0x34e/0x3c0 net/netfilter/nf_tables_api.c:845, CPU#0: syz.0.17/5992 This is triggered with fault injection. This is an interval set allocating a new array that is allocated with GFP_KERNEL (rbtree/pipapo follow a similar approach), I suspect fault injection is making this memory allocation fail. Then, this WARN_ON_ONCE below triggers: static void nft_map_deactivate(const struct nft_ctx *ctx, struct nft_set *set) { struct nft_set_iter iter = { .genmask = nft_genmask_next(ctx->net), .type = NFT_ITER_UPDATE, .fn = nft_mapelem_deactivate, }; set->ops->walk(ctx, set, &iter); WARN_ON_ONCE(iter.err); For the traceback below, it should be possible to add NFT_ITER_RELEASE to skip the allocation. But there are other paths where this can happen too, I am looking into making these nft_map_activate/nft_map_deactivate function never fail in the second stage, this is the idea: - For anonymous sets, the allocation (clone) can be skipped since they are immutable. - For non-anonymous sets, add a .clone interface to nft_set_ops so the clone is not done from the Those two should be relatively small, I am preparing a patch. > Modules linked in: > CPU: 0 UID: 0 PID: 5992 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 > RIP: 0010:nft_map_deactivate+0x34e/0x3c0 net/netfilter/nf_tables_api.c:845 > Code: 8b 05 86 5a 4e 09 48 3b 84 24 a0 00 00 00 75 62 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc e8 63 6d fa f7 90 <0f> 0b 90 43 80 7c 35 00 00 0f 85 23 fe ff ff e9 26 fe ff ff 89 d9 > RSP: 0018:ffffc900045af780 EFLAGS: 00010293 > RAX: ffffffff89ca45bd RBX: 00000000fffffff4 RCX: ffff888028111e40 > RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 > RBP: ffffc900045af870 R08: 0000000000400dc0 R09: 00000000ffffffff > R10: dffffc0000000000 R11: fffffbfff1d141db R12: ffffc900045af7e0 > R13: 1ffff920008b5f24 R14: dffffc0000000000 R15: ffffc900045af920 > FS: 000055557a6a5500(0000) GS:ffff888125496000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00007fb5ea271fc0 CR3: 000000003269e000 CR4: 00000000003526f0 > Call Trace: > <TASK> > __nft_release_table+0xceb/0x11f0 net/netfilter/nf_tables_api.c:12115 > nft_rcv_nl_event+0xc25/0xdb0 net/netfilter/nf_tables_api.c:12187 > notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 > blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 > netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:761 > __sock_release net/socket.c:662 [inline] > sock_close+0xc3/0x240 net/socket.c:1455 > __fput+0x44f/0xa70 fs/file_table.c:469 > fput_close_sync+0x11f/0x240 fs/file_table.c:574 > __do_sys_close fs/open.c:1509 [inline] > __se_sys_close fs/open.c:1494 [inline] > __x64_sys_close+0x7e/0x110 fs/open.c:1494 > do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] > do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 > entry_SYSCALL_64_after_hwframe+0x77/0x7f > RIP: 0033:0x7fb5ea39c629 > Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007fff72e03568 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 > RAX: ffffffffffffffda RBX: 00007fb5ea615fa0 RCX: 00007fb5ea39c629 > RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 > RBP: 00007fff72e035d0 R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 > R13: 00007fb5ea615fac R14: 00007fb5ea615fa0 R15: 00007fb5ea615fa0 > </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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [netfilter?] WARNING in nft_map_deactivate 2026-02-19 12:26 ` Pablo Neira Ayuso @ 2026-02-19 15:17 ` Florian Westphal 0 siblings, 0 replies; 3+ messages in thread From: Florian Westphal @ 2026-02-19 15:17 UTC (permalink / raw) To: Pablo Neira Ayuso Cc: syzbot, coreteam, davem, edumazet, horms, kuba, linux-kernel, netdev, netfilter-devel, pabeni, phil, syzkaller-bugs Pablo Neira Ayuso <pablo@netfilter.org> wrote: > This is an interval set allocating a new array that is allocated with > GFP_KERNEL (rbtree/pipapo follow a similar approach), I suspect fault > injection is making this memory allocation fail. > > Then, this WARN_ON_ONCE below triggers: > > static void nft_map_deactivate(const struct nft_ctx *ctx, struct nft_set *set) > { > struct nft_set_iter iter = { > .genmask = nft_genmask_next(ctx->net), > .type = NFT_ITER_UPDATE, > .fn = nft_mapelem_deactivate, > }; > > set->ops->walk(ctx, set, &iter); > WARN_ON_ONCE(iter.err); > > For the traceback below, it should be possible to add NFT_ITER_RELEASE > to skip the allocation. Agreed. > But there are other paths where this can happen too, I am looking into > making these nft_map_activate/nft_map_deactivate function never fail > in the second stage, this is the idea: > > - For anonymous sets, the allocation (clone) can be skipped since they > are immutable. Right, there is no need to clone anon sets. > - For non-anonymous sets, add a .clone interface to nft_set_ops so > the clone is not done from the Yes, that would help. However, I'm not sure its needed. For 2nd stage that cannot fail, all inserts/deletes already completed, i.e. there is already a clone present that is re-used, no new clone happens. The only exception that I can see is the "release" case you mention. In that case, we had no delete or add, so the clone pointer is NULL. With a new iter type we could detect this and just re-use the live copy instead of making an unnecessary copy. Or did I miss something? ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-19 15:17 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-02-19 9:53 [syzbot] [netfilter?] WARNING in nft_map_deactivate syzbot 2026-02-19 12:26 ` Pablo Neira Ayuso 2026-02-19 15:17 ` Florian Westphal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox