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: 0 UID: 0 PID: 9132 Comm: syz.1.895 Not tainted 6.13.0-rc1-syzkaller-gb5f217084ab3 #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 fe 82 f0 ff 4d 8d 75 10 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 f4 6f 5b 00 49 8b 1e 48 85 db 74 RSP: 0018:ffffc9001b42f6d0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 1ffff92003685ee4 RCX: ffff888025761e00 RDX: 0000000000000000 RSI: ffffc9001b421000 RDI: 0000000000000000 RBP: ffffc9001b42f7a8 R08: ffffffff81ab3e6e R09: 1ffffffff2032976 R10: dffffc0000000000 R11: fffffbfff2032977 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000010 R15: ffffc9001b421000 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000004 CR3: 0000000054346000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000006 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:10794 [inline] _free_event+0xb04/0xf60 kernel/events/core.c:5345 put_event kernel/events/core.c:5447 [inline] perf_event_release_kernel+0x7c1/0x850 kernel/events/core.c:5572 perf_release+0x38/0x40 kernel/events/core.c:5582 __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:3017 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/0x8b0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f6a2cf7fee1 Code: Unable to access opcode bytes at 0x7f6a2cf7feb7. RSP: 002b:fffffffffffffd70 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f6a2d146080 RCX: 00007f6a2cf7fed9 RDX: 0000000000000000 RSI: fffffffffffffd70 RDI: 0000000000184000 RBP: 00007f6a2cff3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6a2d146080 R15: 00007ffff4e5bad8 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 fe 82 f0 ff 4d 8d 75 10 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 f4 6f 5b 00 49 8b 1e 48 85 db 74 RSP: 0018:ffffc9001b42f6d0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 1ffff92003685ee4 RCX: ffff888025761e00 RDX: 0000000000000000 RSI: ffffc9001b421000 RDI: 0000000000000000 RBP: ffffc9001b42f7a8 R08: ffffffff81ab3e6e R09: 1ffffffff2032976 R10: dffffc0000000000 R11: fffffbfff2032977 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000010 R15: ffffc9001b421000 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000006116e000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000006 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 fe 82 f0 ff call 0xfff0831d 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 f4 6f 5b 00 call 0x5b702d 39: 49 8b 1e mov (%r14),%rbx 3c: 48 85 db test %rbx,%rbx 3f: 74 .byte 0x74