general protection fault, probably for non-canonical address 0xdffffc0000000018: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000c0-0x00000000000000c7] CPU: 0 PID: 10370 Comm: syz-executor.1 Not tainted 6.1.68-syzkaller-00105-gf085398f0e8f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:xdp_ok_fwd_dev include/linux/filter.h:966 [inline] RIP: 0010:dev_map_generic_redirect+0xdd/0x7d0 kernel/bpf/devmap.c:664 Code: 89 44 24 40 42 0f b6 04 20 84 c0 0f 85 6a 04 00 00 48 89 5c 24 08 8b 03 89 44 24 04 49 8d 9f c0 00 00 00 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 61 04 00 00 8b 1b 89 de 83 e6 01 31 ff RSP: 0018:ffffc900049376c0 EFLAGS: 00010206 RAX: 0000000000000018 RBX: 00000000000000c0 RCX: 0000000000040000 RDX: ffffc90001309000 RSI: 00000000000003e7 RDI: 00000000000003e8 RBP: ffffc90004937818 R08: 0000000000000005 R09: ffffffff8410bf83 R10: 0000000000000004 R11: ffff88812a8e0000 R12: dffffc0000000000 R13: ffff888145310dc0 R14: 1ffff92000926ee4 R15: 0000000000000000 FS: 00007f877648d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 00000001389e8000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000042 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: xdp_do_generic_redirect_map net/core/filter.c:4355 [inline] xdp_do_generic_redirect+0x411/0xad0 net/core/filter.c:4412 do_xdp_generic+0x53e/0x800 net/core/dev.c:4951 tun_get_user+0x238a/0x3a90 drivers/net/tun.c:1913 tun_chr_write_iter+0x129/0x210 drivers/net/tun.c:2037 call_write_iter include/linux/fs.h:2258 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x902/0xeb0 fs/read_write.c:584 ksys_write+0x199/0x2c0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f877567caef Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48 RSP: 002b:00007f877648d090 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f87757abf80 RCX: 00007f877567caef RDX: 000000000000fdef RSI: 0000000020000040 RDI: 00000000000000c8 RBP: 00007f87756ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 000000000000000b R14: 00007f87757abf80 R15: 00007ffda97819c8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:xdp_ok_fwd_dev include/linux/filter.h:966 [inline] RIP: 0010:dev_map_generic_redirect+0xdd/0x7d0 kernel/bpf/devmap.c:664 Code: 89 44 24 40 42 0f b6 04 20 84 c0 0f 85 6a 04 00 00 48 89 5c 24 08 8b 03 89 44 24 04 49 8d 9f c0 00 00 00 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 61 04 00 00 8b 1b 89 de 83 e6 01 31 ff RSP: 0018:ffffc900049376c0 EFLAGS: 00010206 RAX: 0000000000000018 RBX: 00000000000000c0 RCX: 0000000000040000 RDX: ffffc90001309000 RSI: 00000000000003e7 RDI: 00000000000003e8 RBP: ffffc90004937818 R08: 0000000000000005 R09: ffffffff8410bf83 R10: 0000000000000004 R11: ffff88812a8e0000 R12: dffffc0000000000 R13: ffff888145310dc0 R14: 1ffff92000926ee4 R15: 0000000000000000 FS: 00007f877648d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 00000001389e8000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000042 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 89 44 24 40 mov %eax,0x40(%rsp) 4: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax 9: 84 c0 test %al,%al b: 0f 85 6a 04 00 00 jne 0x47b 11: 48 89 5c 24 08 mov %rbx,0x8(%rsp) 16: 8b 03 mov (%rbx),%eax 18: 89 44 24 04 mov %eax,0x4(%rsp) 1c: 49 8d 9f c0 00 00 00 lea 0xc0(%r15),%rbx 23: 48 89 d8 mov %rbx,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 0f 85 61 04 00 00 jne 0x498 37: 8b 1b mov (%rbx),%ebx 39: 89 de mov %ebx,%esi 3b: 83 e6 01 and $0x1,%esi 3e: 31 ff xor %edi,%edi