BUG: kernel NULL pointer dereference, address: 0000000000000054 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 10d7dd067 P4D 10d7dd067 PUD 10d7fb067 PMD 0 Oops: 0002 [#1] PREEMPT SMP CPU: 0 PID: 2370 Comm: syz-executor.0 Not tainted 6.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 RIP: 0010:arch_atomic_fetch_add arch/x86/include/asm/atomic.h:97 [inline] RIP: 0010:raw_atomic_fetch_add_relaxed include/linux/atomic/atomic-arch-fallback.h:749 [inline] RIP: 0010:atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:253 [inline] RIP: 0010:__refcount_add include/linux/refcount.h:182 [inline] RIP: 0010:__refcount_inc include/linux/refcount.h:239 [inline] RIP: 0010:refcount_inc include/linux/refcount.h:256 [inline] RIP: 0010:btf_get+0xd/0x40 kernel/bpf/btf.c:1733 Code: 03 47 20 c3 66 0f 1f 84 00 00 00 00 00 66 0f 1f 00 48 8d 87 a0 00 00 00 c3 0f 1f 40 00 66 0f 1f 00 48 8d 4f 54 b8 01 00 00 00 0f c1 47 54 85 c0 74 15 8d 50 01 09 c2 78 01 c3 be 01 00 00 00 RSP: 0018:ffffc90002807d60 EFLAGS: 00010207 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000054 RDX: 0000000000000000 RSI: ffffffff83495d80 RDI: 0000000000000000 RBP: ffffc90002807e40 R08: ffffffff83495d80 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 000000000000001a R14: ffffffff82a2b9c0 R15: 0000000000000000 FS: 00007ff871b156c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000054 CR3: 000000010db04000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_struct_ops_map_alloc+0x93/0x1f0 kernel/bpf/bpf_struct_ops.c:702 map_create+0x15c/0x750 kernel/bpf/syscall.c:1237 __sys_bpf+0x5c7/0x2850 kernel/bpf/syscall.c:5445 __do_sys_bpf kernel/bpf/syscall.c:5567 [inline] __se_sys_bpf kernel/bpf/syscall.c:5565 [inline] __x64_sys_bpf+0x19/0x20 kernel/bpf/syscall.c:5565 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x71/0x1a0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7ff870e7cda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff871b150c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007ff870fabf80 RCX: 00007ff870e7cda9 RDX: 0000000000000048 RSI: 00000000200004c0 RDI: 0000000000000000 RBP: 00007ff870ec947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007ff870fabf80 R15: 00007fff0a368b68 Modules linked in: CR2: 0000000000000054 ---[ end trace 0000000000000000 ]--- RIP: 0010:arch_atomic_fetch_add arch/x86/include/asm/atomic.h:97 [inline] RIP: 0010:raw_atomic_fetch_add_relaxed include/linux/atomic/atomic-arch-fallback.h:749 [inline] RIP: 0010:atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:253 [inline] RIP: 0010:__refcount_add include/linux/refcount.h:182 [inline] RIP: 0010:__refcount_inc include/linux/refcount.h:239 [inline] RIP: 0010:refcount_inc include/linux/refcount.h:256 [inline] RIP: 0010:btf_get+0xd/0x40 kernel/bpf/btf.c:1733 Code: 03 47 20 c3 66 0f 1f 84 00 00 00 00 00 66 0f 1f 00 48 8d 87 a0 00 00 00 c3 0f 1f 40 00 66 0f 1f 00 48 8d 4f 54 b8 01 00 00 00 0f c1 47 54 85 c0 74 15 8d 50 01 09 c2 78 01 c3 be 01 00 00 00 RSP: 0018:ffffc90002807d60 EFLAGS: 00010207 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000054 RDX: 0000000000000000 RSI: ffffffff83495d80 RDI: 0000000000000000 RBP: ffffc90002807e40 R08: ffffffff83495d80 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 000000000000001a R14: ffffffff82a2b9c0 R15: 0000000000000000 FS: 00007ff871b156c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000054 CR3: 000000010db04000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 03 47 20 add 0x20(%rdi),%eax 3: c3 ret 4: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) b: 00 00 d: 66 0f 1f 00 nopw (%rax) 11: 48 8d 87 a0 00 00 00 lea 0xa0(%rdi),%rax 18: c3 ret 19: 0f 1f 40 00 nopl 0x0(%rax) 1d: 66 0f 1f 00 nopw (%rax) 21: 48 8d 4f 54 lea 0x54(%rdi),%rcx 25: b8 01 00 00 00 mov $0x1,%eax * 2a: f0 0f c1 47 54 lock xadd %eax,0x54(%rdi) <-- trapping instruction 2f: 85 c0 test %eax,%eax 31: 74 15 je 0x48 33: 8d 50 01 lea 0x1(%rax),%edx 36: 09 c2 or %eax,%edx 38: 78 01 js 0x3b 3a: c3 ret 3b: be 01 00 00 00 mov $0x1,%esi