Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 1 UID: 0 PID: 8263 Comm: syz.4.441 Not tainted 6.12.0-syzkaller-09099-ge2cf913314b9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:bpf_prog_array_delete_safe+0x2d/0xc0 kernel/bpf/core.c:2583 Code: 00 41 57 41 56 41 55 41 54 53 49 89 f7 49 89 fd 49 bc 00 00 00 00 00 fc ff df e8 ce 84 f0 ff 4d 8d 75 10 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 54 6b 5b 00 49 8b 1e 48 85 db 74 RSP: 0018:ffffc900043876d0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 1ffff92000870ee4 RCX: ffff888027085a00 RDX: 0000000000000000 RSI: ffffc90003663000 RDI: 0000000000000000 RBP: ffffc900043877a8 R08: ffffffff81a1aa9e R09: 1ffffffff203c816 R10: dffffc0000000000 R11: fffffbfff203c817 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000010 R15: ffffc90003663000 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000563537f41950 CR3: 00000000129a2000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: perf_event_detach_bpf_prog+0x2b0/0x330 kernel/trace/bpf_trace.c:2255 perf_event_free_bpf_prog kernel/events/core.c:10801 [inline] _free_event+0xb04/0xf60 kernel/events/core.c:5352 put_event kernel/events/core.c:5454 [inline] perf_event_release_kernel+0x7c1/0x850 kernel/events/core.c:5579 perf_release+0x38/0x40 kernel/events/core.c:5589 __fput+0x23c/0xa50 fs/file_table.c:450 task_work_run+0x24f/0x310 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa2f/0x28e0 kernel/exit.c:938 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 get_signal+0x16b2/0x1750 kernel/signal.c:3016 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] irqentry_exit_to_user_mode+0x7e/0x250 kernel/entry/common.c:231 exc_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f7d0bb7ff21 Code: Unable to access opcode bytes at 0x7f7d0bb7fef7. RSP: 002b:fffffffffffffd70 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f7d0bd45fa0 RCX: 00007f7d0bb7ff19 RDX: 0000000000000000 RSI: fffffffffffffd70 RDI: 0000000000184000 RBP: 00007f7d0bbf3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7d0bd45fa0 R15: 00007ffc35395eb8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bpf_prog_array_delete_safe+0x2d/0xc0 kernel/bpf/core.c:2583 Code: 00 41 57 41 56 41 55 41 54 53 49 89 f7 49 89 fd 49 bc 00 00 00 00 00 fc ff df e8 ce 84 f0 ff 4d 8d 75 10 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 54 6b 5b 00 49 8b 1e 48 85 db 74 RSP: 0018:ffffc900043876d0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 1ffff92000870ee4 RCX: ffff888027085a00 RDX: 0000000000000000 RSI: ffffc90003663000 RDI: 0000000000000000 RBP: ffffc900043877a8 R08: ffffffff81a1aa9e R09: 1ffffffff203c816 R10: dffffc0000000000 R11: fffffbfff203c817 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000010 R15: ffffc90003663000 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1eb288c5a0 CR3: 000000005d14e000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 ---------------- Code disassembly (best guess): 0: 00 41 57 add %al,0x57(%rcx) 3: 41 56 push %r14 5: 41 55 push %r13 7: 41 54 push %r12 9: 53 push %rbx a: 49 89 f7 mov %rsi,%r15 d: 49 89 fd mov %rdi,%r13 10: 49 bc 00 00 00 00 00 movabs $0xdffffc0000000000,%r12 17: fc ff df 1a: e8 ce 84 f0 ff call 0xfff084ed 1f: 4d 8d 75 10 lea 0x10(%r13),%r14 23: 4c 89 f0 mov %r14,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 4c 89 f7 mov %r14,%rdi 34: e8 54 6b 5b 00 call 0x5b6b8d 39: 49 8b 1e mov (%r14),%rbx 3c: 48 85 db test %rbx,%rbx 3f: 74 .byte 0x74