Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 14222 Comm: syz-executor.3 Not tainted 6.10.0-rc4-syzkaller-00330-g7c16f0a4ed1c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:dev_map_generic_redirect+0xb9/0x5f0 kernel/bpf/devmap.c:681
Code: 48 c1 e8 03 42 0f b6 04 20 84 c0 74 08 3c 03 0f 8e 50 04 00 00 48 89 ea 44 8b 73 70 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 89 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc90004b2f878 EFLAGS: 00010256
RAX: dffffc0000000000 RBX: ffff88807b912500 RCX: ffffc9000db4b000
RDX: 0000000000000000 RSI: ffffffff81b46466 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: 1ffff92000965f15 R14: 0000000000000d81 R15: 0000000000000000
FS:  00007fe6c3e8e6c0(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fca3a209440 CR3: 00000000606a4000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 xdp_do_generic_redirect_map net/core/filter.c:4490 [inline]
 xdp_do_generic_redirect+0x309/0x720 net/core/filter.c:4549
 do_xdp_generic+0x77f/0xc30 net/core/dev.c:5108
 tun_get_user+0x1d36/0x3c30 drivers/net/tun.c:1924
 tun_chr_write_iter+0xe8/0x210 drivers/net/tun.c:2048
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x6b9/0x1140 fs/read_write.c:590
 ksys_write+0x12f/0x260 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe6c307bdef
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:00007fe6c3e8e090 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fe6c31b3f80 RCX: 00007fe6c307bdef
RDX: 0000000000000d81 RSI: 0000000020001540 RDI: 00000000000000c8
RBP: 00007fe6c30ec074 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000d81 R11: 0000000000000293 R12: 0000000000000000
R13: 000000000000000b R14: 00007fe6c31b3f80 R15: 00007ffdc57985d8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dev_map_generic_redirect+0xb9/0x5f0 kernel/bpf/devmap.c:681
Code: 48 c1 e8 03 42 0f b6 04 20 84 c0 74 08 3c 03 0f 8e 50 04 00 00 48 89 ea 44 8b 73 70 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 89 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc90004b2f878 EFLAGS: 00010256
RAX: dffffc0000000000 RBX: ffff88807b912500 RCX: ffffc9000db4b000
RDX: 0000000000000000 RSI: ffffffff81b46466 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: 1ffff92000965f15 R14: 0000000000000d81 R15: 0000000000000000
FS:  00007fe6c3e8e6c0(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fca3a209440 CR3: 00000000606a4000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	48 c1 e8 03          	shr    $0x3,%rax
   4:	42 0f b6 04 20       	movzbl (%rax,%r12,1),%eax
   9:	84 c0                	test   %al,%al
   b:	74 08                	je     0x15
   d:	3c 03                	cmp    $0x3,%al
   f:	0f 8e 50 04 00 00    	jle    0x465
  15:	48 89 ea             	mov    %rbp,%rdx
  18:	44 8b 73 70          	mov    0x70(%rbx),%r14d
  1c:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  23:	fc ff df
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 89 04 00 00    	jne    0x4bd
  34:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  3b:	fc ff df
  3e:	4c                   	rex.WR
  3f:	8b                   	.byte 0x8b