BUG: kernel NULL pointer dereference, address: 0000000000000038 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 8000000112c49067 P4D 8000000112c49067 PUD 112fe2067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 3311 Comm: syz.0.15 Not tainted 6.10.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:782 [inline] RIP: 0010:__bpf_xdp_redirect_map include/linux/filter.h:1631 [inline] RIP: 0010:cpu_map_redirect+0x17/0xc0 kernel/bpf/cpumap.c:645 Code: 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 89 d0 65 48 8b 0c 25 80 fe 02 00 48 8b 89 90 16 00 00 <8b> 51 38 f6 c2 02 75 2c c7 41 20 00 00 00 00 48 c7 41 18 00 00 00 RSP: 0018:ffffc900001abc30 EFLAGS: 00010246 RAX: 0000000000000008 RBX: ffffc90000f350b8 RCX: 0000000000000000 RDX: 0000000000000008 RSI: 00000000001abce0 RDI: ffff888112b85e00 RBP: ffffc900001abcf8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff81334e50 R12: ffffc900001abc60 R13: 0000000000000022 R14: 0000000000000140 R15: 0000000000000000 FS: 00007fbc1cc1c6c0(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 0000000119cca000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ___bpf_prog_run+0x5f6/0x2280 kernel/bpf/core.c:2012 __bpf_prog_run32+0xbb/0xe0 kernel/bpf/core.c:2253 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] tun_build_skb drivers/net/tun.c:1711 [inline] tun_get_user+0x4a8/0x12c0 drivers/net/tun.c:1819 tun_chr_write_iter+0x5a/0xc0 drivers/net/tun.c:2048 new_sync_write fs/read_write.c:497 [inline] vfs_write+0x2fc/0x490 fs/read_write.c:590 ksys_write+0x70/0xe0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8d/0x1a0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbc1d19175f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 8c 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 7c 8c 02 00 48 RSP: 002b:00007fbc1cc1c010 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fbc1d320f60 RCX: 00007fbc1d19175f RDX: 0000000000000022 RSI: 0000000020000a40 RDI: 00000000000000c8 RBP: 00007fbc1d201aa1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000293 R12: 0000000000000000 R13: 000000000000000b R14: 00007fbc1d320f60 R15: 00007fff7cdfae58 Modules linked in: CR2: 0000000000000038 ---[ end trace 0000000000000000 ]--- RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:782 [inline] RIP: 0010:__bpf_xdp_redirect_map include/linux/filter.h:1631 [inline] RIP: 0010:cpu_map_redirect+0x17/0xc0 kernel/bpf/cpumap.c:645 Code: 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 89 d0 65 48 8b 0c 25 80 fe 02 00 48 8b 89 90 16 00 00 <8b> 51 38 f6 c2 02 75 2c c7 41 20 00 00 00 00 48 c7 41 18 00 00 00 RSP: 0018:ffffc900001abc30 EFLAGS: 00010246 RAX: 0000000000000008 RBX: ffffc90000f350b8 RCX: 0000000000000000 RDX: 0000000000000008 RSI: 00000000001abce0 RDI: ffff888112b85e00 RBP: ffffc900001abcf8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff81334e50 R12: ffffc900001abc60 R13: 0000000000000022 R14: 0000000000000140 R15: 0000000000000000 FS: 00007fbc1cc1c6c0(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 0000000119cca000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 44 00 00 add %r8b,(%rax) 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: f3 0f 1e fa endbr64 17: 48 89 d0 mov %rdx,%rax 1a: 65 48 8b 0c 25 80 fe mov %gs:0x2fe80,%rcx 21: 02 00 23: 48 8b 89 90 16 00 00 mov 0x1690(%rcx),%rcx * 2a: 8b 51 38 mov 0x38(%rcx),%edx <-- trapping instruction 2d: f6 c2 02 test $0x2,%dl 30: 75 2c jne 0x5e 32: c7 41 20 00 00 00 00 movl $0x0,0x20(%rcx) 39: 48 rex.W 3a: c7 .byte 0xc7 3b: 41 18 00 sbb %al,(%r8)