BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 80000001079d5067 P4D 80000001079d5067 PUD 109ea2067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 0 PID: 3628 Comm: syz.2.15 Not tainted 5.10.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:btrfs_root_node+0x2a/0x90 fs/btrfs/ctree.c:129 Code: 41 54 55 48 c7 c5 3e d6 5b 81 53 48 89 fb 31 d2 55 45 31 c9 45 31 c0 31 f6 b9 02 00 00 00 48 c7 c7 40 c5 35 83 e8 96 7c bb ff <4c> 8b 23 5a 41 8b 44 24 60 85 c0 74 32 49 8d 54 24 60 8d 48 01 f0 RSP: 0018:ffffc90000ca7d38 EFLAGS: 00010246 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00000000ef95c707 RDX: 00000000e74b46f9 RSI: 00000000b674fed7 RDI: 000000003920c830 RBP: ffffffff815bd63e R08: 0000000000020026 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8881079f4540 R14: ffffc90000ca7e80 R15: ffff88810af68000 FS: 00007f08905c56c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001107d4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btrfs_read_lock_root_node+0x25/0x50 fs/btrfs/locking.c:573 btrfs_search_slot_get_root fs/btrfs/ctree.c:2619 [inline] btrfs_search_slot+0x49d/0x9b0 fs/btrfs/ctree.c:2718 extent_from_logical+0x6a/0x1b0 fs/btrfs/backref.c:1758 iterate_inodes_from_logical+0x5b/0xd0 fs/btrfs/backref.c:2031 btrfs_ioctl_logical_to_ino+0xaf/0x190 fs/btrfs/ioctl.c:3898 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x7e/0xb0 fs/ioctl.c:739 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f0891345719 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f08905c5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f08914fcf80 RCX: 00007f0891345719 RDX: 0000000020000080 RSI: 00000000c0389424 RDI: 0000000000000004 RBP: 00007f08913b832e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f08914fcf80 R15: 00007ffcebbbb708 Modules linked in: CR2: 0000000000000000 ---[ end trace 2ad93453aba18f40 ]--- RIP: 0010:btrfs_root_node+0x2a/0x90 fs/btrfs/ctree.c:129 Code: 41 54 55 48 c7 c5 3e d6 5b 81 53 48 89 fb 31 d2 55 45 31 c9 45 31 c0 31 f6 b9 02 00 00 00 48 c7 c7 40 c5 35 83 e8 96 7c bb ff <4c> 8b 23 5a 41 8b 44 24 60 85 c0 74 32 49 8d 54 24 60 8d 48 01 f0 RSP: 0018:ffffc90000ca7d38 EFLAGS: 00010246 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00000000ef95c707 RDX: 00000000e74b46f9 RSI: 00000000b674fed7 RDI: 000000003920c830 RBP: ffffffff815bd63e R08: 0000000000020026 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8881079f4540 R14: ffffc90000ca7e80 R15: ffff88810af68000 FS: 00007f08905c56c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001107d4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 41 54 push %r12 2: 55 push %rbp 3: 48 c7 c5 3e d6 5b 81 mov $0xffffffff815bd63e,%rbp a: 53 push %rbx b: 48 89 fb mov %rdi,%rbx e: 31 d2 xor %edx,%edx 10: 55 push %rbp 11: 45 31 c9 xor %r9d,%r9d 14: 45 31 c0 xor %r8d,%r8d 17: 31 f6 xor %esi,%esi 19: b9 02 00 00 00 mov $0x2,%ecx 1e: 48 c7 c7 40 c5 35 83 mov $0xffffffff8335c540,%rdi 25: e8 96 7c bb ff call 0xffbb7cc0 * 2a: 4c 8b 23 mov (%rbx),%r12 <-- trapping instruction 2d: 5a pop %rdx 2e: 41 8b 44 24 60 mov 0x60(%r12),%eax 33: 85 c0 test %eax,%eax 35: 74 32 je 0x69 37: 49 8d 54 24 60 lea 0x60(%r12),%rdx 3c: 8d 48 01 lea 0x1(%rax),%ecx 3f: f0 lock