Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in nft_do_chain
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 20 Comm: ksoftirqd/1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
RIP: 0010:nft_trace_packet net/netfilter/nf_tables_core.c:45 [inline]
RIP: 0010:nft_do_chain+0x15d6/0x1680 net/netfilter/nf_tables_core.c:309
Code: a0 00 00 00 48 8b 5c 24 40 48 89 d9 e8 d3 3a 06 00 e9 18 ec ff ff e8 b9 4b 5e f9 48 8b 9c 24 58 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 fb 84 a4 f9 48 8b 1b 48 83 eb 80
RSP: 0018:ffffc90000da7320 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88813fe78000
RDX: 0000000000000100 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000da7610 R08: ffff88813fe78000 R09: 0000000000000004
R10: 00000000ffffffff R11: 0000000000000100 R12: ffff88806d15f328
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88806d15fc08
FS: 0000000000000000(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f49ca611ff8 CR3: 000000007d228000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
nft_do_chain_inet+0x25c/0x340 net/netfilter/nft_chain_filter.c:161
nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline]
nf_hook_slow+0xb9/0x200 net/netfilter/core.c:584
nf_hook include/linux/netfilter.h:257 [inline]
NF_HOOK+0x1f2/0x390 include/linux/netfilter.h:300
NF_HOOK+0x303/0x390 include/linux/netfilter.h:302
__netif_receive_skb_one_core net/core/dev.c:5551 [inline]
__netif_receive_skb+0xcc/0x290 net/core/dev.c:5665
process_backlog+0x366/0x770 net/core/dev.c:6542
__napi_poll+0xbb/0x430 net/core/dev.c:7101
napi_poll net/core/dev.c:7168 [inline]
net_rx_action+0x522/0xa80 net/core/dev.c:7258
handle_softirqs+0x336/0x830 kernel/softirq.c:576
run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
smpboot_thread_fn+0x520/0x990 kernel/smpboot.c:164
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
Modules linked in:
---[ end trace e03a8adf155321d4 ]---
RIP: 0010:nft_trace_packet net/netfilter/nf_tables_core.c:45 [inline]
RIP: 0010:nft_do_chain+0x15d6/0x1680 net/netfilter/nf_tables_core.c:309
Code: a0 00 00 00 48 8b 5c 24 40 48 89 d9 e8 d3 3a 06 00 e9 18 ec ff ff e8 b9 4b 5e f9 48 8b 9c 24 58 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 fb 84 a4 f9 48 8b 1b 48 83 eb 80
RSP: 0018:ffffc90000da7320 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88813fe78000
RDX: 0000000000000100 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000da7610 R08: ffff88813fe78000 R09: 0000000000000004
R10: 00000000ffffffff R11: 0000000000000100 R12: ffff88806d15f328
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88806d15fc08
FS: 0000000000000000(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f49ca611ff8 CR3: 000000007d228000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: a0 00 00 00 48 8b 5c movabs 0x40245c8b48000000,%al
7: 24 40
9: 48 89 d9 mov %rbx,%rcx
c: e8 d3 3a 06 00 call 0x63ae4
11: e9 18 ec ff ff jmp 0xffffec2e
16: e8 b9 4b 5e f9 call 0xf95e4bd4
1b: 48 8b 9c 24 58 02 00 mov 0x258(%rsp),%rbx
22: 00
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 48 89 df mov %rbx,%rdi
34: e8 fb 84 a4 f9 call 0xf9a48534
39: 48 8b 1b mov (%rbx),%rbx
3c: 48 83 eb 80 sub $0xffffffffffffff80,%rbx
Tested on:
commit: c86c4726 Linux 5.15.211
git tree:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
console output:
https://syzkaller.appspot.com/x/log.txt?x=16eb9b89580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=24d7079d1bc540f8
dashboard link:
https://syzkaller.appspot.com/bug?extid=2a8850ea36efb12f5aed
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
patch:
https://syzkaller.appspot.com/x/patch.diff?x=109030b9580000