syzbot


general protection fault in btrfs_root_node

Status: upstream: reported C repro on 2024/09/03 16:42
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+9c3e0cdfbfe351b0bc0e@syzkaller.appspotmail.com
First crash: 162d, last: 10h41m
Cause bisection: introduced by (bisect log) :
commit 42437a6386ffeaaf200731e73d723ea491f3fe7d
Author: Josef Bacik <josef@toxicpanda.com>
Date: Fri Oct 16 15:29:18 2020 +0000

  btrfs: introduce mount option rescue=ignorebadroots

Crash: BUG: unable to handle kernel NULL pointer dereference in btrfs_root_node (log)
Repro: C syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] Monthly btrfs report (Jan 2025) 0 (1) 2025/01/20 08:14
[syzbot] Monthly btrfs report (Dec 2024) 0 (1) 2024/12/19 18:39
[syzbot] [btrfs?] general protection fault in btrfs_root_node 0 (5) 2024/11/12 10:47
[PATCH] btrfs: Added null check to extent_root variable 6 (6) 2024/09/04 21:31
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: null-ptr-deref Write in btrfs_root_node (2) origin:lts-only C done 20 3h17m 510d 0/3 upstream: reported C repro on 2023/09/18 04:34
linux-6.1 BUG: unable to handle kernel paging request in btrfs_root_node origin:upstream C 5 28d 105d 0/3 upstream: reported C repro on 2024/10/27 14:03
linux-5.15 KASAN: null-ptr-deref Write in btrfs_root_node 1 657d 657d 0/3 auto-obsoleted due to no activity on 2023/08/22 05:04
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/09/16 03:11 14m retest repro upstream report log
2024/09/04 02:12 19m ghanshyam1898@gmail.com patch upstream OK log
2024/09/04 01:43 0m ghanshyam1898@gmail.com patch upstream error
2024/09/04 01:38 0m ghanshyam1898@gmail.com patch upstream error

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 0 UID: 0 PID: 5819 Comm: syz-executor419 Not tainted 6.13.0-rc1-syzkaller-00316-gb5f217084ab3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:btrfs_root_node+0x86/0x3b0 fs/btrfs/ctree.c:260
Code: 50 1e c4 fd 48 83 c4 08 e8 e7 67 11 08 89 c3 31 ff 89 c6 e8 3c e9 e8 fd 85 db 74 17 e8 03 7f ce fd 84 c0 74 1c e8 ea e4 e8 fd <43> 80 3c 3c 00 75 4b eb 51 e8 dc e4 e8 fd 43 80 3c 3c 00 75 3d eb
RSP: 0018:ffffc90003e8f6c0 EFLAGS: 00010293
RAX: ffffffff83b68cd6 RBX: 0000000000000001 RCX: ffff8880367fda00
RDX: 0000000000000000 RSI: ffffffff8c5e90c0 RDI: ffffffff8c5e9080
RBP: ffffc90003e8f8b0 R08: ffffffff83b68cc4 R09: 1ffffffff2850710
R10: dffffc0000000000 R11: fffffbfff2850711 R12: 0000000000000003
R13: dffffc0000000000 R14: 0000000000000018 R15: dffffc0000000000
FS:  0000555555b0f380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055653e51f088 CR3: 0000000024466000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_read_lock_root_node+0x27/0xd0 fs/btrfs/locking.c:264
 btrfs_build_ref_tree+0x112/0x16f0 fs/btrfs/ref-verify.c:1006
 open_ctree+0x1fb1/0x2a30 fs/btrfs/disk-io.c:3520
 btrfs_fill_super fs/btrfs/super.c:972 [inline]
 btrfs_get_tree_super fs/btrfs/super.c:1894 [inline]
 btrfs_get_tree+0x1274/0x1a10 fs/btrfs/super.c:2105
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 fc_mount+0x1b/0xb0 fs/namespace.c:1231
 btrfs_get_tree_subvol fs/btrfs/super.c:2068 [inline]
 btrfs_get_tree+0x65b/0x1a10 fs/btrfs/super.c:2106
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7cb7b5ff6a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffddc2cd398 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffddc2cd3a0 RCX: 00007f7cb7b5ff6a
RDX: 0000000020000080 RSI: 0000000020000040 RDI: 00007ffddc2cd3a0
RBP: 0000000000000004 R08: 00007ffddc2cd3e0 R09: 00000000000055c5
R10: 000000000001c005 R11: 0000000000000282 R12: 00007ffddc2cd3e0
R13: 0000000000000003 R14: 0000000001000000 R15: 00007f7cb7ba703b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_root_node+0x86/0x3b0 fs/btrfs/ctree.c:260
Code: 50 1e c4 fd 48 83 c4 08 e8 e7 67 11 08 89 c3 31 ff 89 c6 e8 3c e9 e8 fd 85 db 74 17 e8 03 7f ce fd 84 c0 74 1c e8 ea e4 e8 fd <43> 80 3c 3c 00 75 4b eb 51 e8 dc e4 e8 fd 43 80 3c 3c 00 75 3d eb
RSP: 0018:ffffc90003e8f6c0 EFLAGS: 00010293
RAX: ffffffff83b68cd6 RBX: 0000000000000001 RCX: ffff8880367fda00
RDX: 0000000000000000 RSI: ffffffff8c5e90c0 RDI: ffffffff8c5e9080
RBP: ffffc90003e8f8b0 R08: ffffffff83b68cc4 R09: 1ffffffff2850710
R10: dffffc0000000000 R11: fffffbfff2850711 R12: 0000000000000003
R13: dffffc0000000000 R14: 0000000000000018 R15: dffffc0000000000
FS:  0000555555b0f380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055653e51f088 CR3: 0000000024466000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 3 bytes skipped:
   0:	fd                   	std
   1:	48 83 c4 08          	add    $0x8,%rsp
   5:	e8 e7 67 11 08       	call   0x81167f1
   a:	89 c3                	mov    %eax,%ebx
   c:	31 ff                	xor    %edi,%edi
   e:	89 c6                	mov    %eax,%esi
  10:	e8 3c e9 e8 fd       	call   0xfde8e951
  15:	85 db                	test   %ebx,%ebx
  17:	74 17                	je     0x30
  19:	e8 03 7f ce fd       	call   0xfdce7f21
  1e:	84 c0                	test   %al,%al
  20:	74 1c                	je     0x3e
  22:	e8 ea e4 e8 fd       	call   0xfde8e511
* 27:	43 80 3c 3c 00       	cmpb   $0x0,(%r12,%r15,1) <-- trapping instruction
  2c:	75 4b                	jne    0x79
  2e:	eb 51                	jmp    0x81
  30:	e8 dc e4 e8 fd       	call   0xfde8e511
  35:	43 80 3c 3c 00       	cmpb   $0x0,(%r12,%r15,1)
  3a:	75 3d                	jne    0x79
  3c:	eb                   	.byte 0xeb

Crashes (253):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/07 12:46 upstream b5f217084ab3 9ac0fdc6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in btrfs_root_node
2024/11/11 09:16 upstream 2d5404caa8c7 6b856513 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in btrfs_root_node
2025/02/09 05:16 upstream 9946eaf552b1 ef44b750 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2024/08/30 16:47 upstream 20371ba12063 db150e23 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2024/11/23 08:08 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in btrfs_root_node
2025/02/08 20:53 upstream 8f6629c004b1 ef44b750 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/08 07:50 upstream 7ee983c850b4 ef44b750 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/08 04:05 upstream 7ee983c850b4 ef44b750 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/05 14:34 upstream 5c8c229261f1 5896748e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/05 02:44 upstream d009de7d5428 44c01590 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/04 09:09 upstream 0de63bb7d919 8f267cef .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/04 02:15 upstream 0de63bb7d919 8f267cef .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/03 17:58 upstream 2014c95afece a21a8419 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/03 13:55 upstream 2014c95afece a21a8419 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/02 08:38 upstream 69e858e0b8b2 568559e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/02 04:02 upstream 69e858e0b8b2 568559e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/02/01 06:53 upstream 69e858e0b8b2 aa47157c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/31 02:44 upstream b4b0881156fb 4c6ac32f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/30 07:51 upstream 805ba04cb7cc afe4eff5 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/29 01:45 upstream 805ba04cb7cc 865ef71e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/28 21:00 upstream 805ba04cb7cc ac37c1f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/28 06:44 upstream 805ba04cb7cc 18070896 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/26 00:21 upstream 405057718a1f 9fbd772e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/25 17:04 upstream b46c89c08f41 9fbd772e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/24 16:34 upstream bc8198dc7ebc 1293872d .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/24 04:42 upstream e0b1f5914274 521b0ce3 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/21 02:38 upstream ffd294d346d1 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/21 00:36 upstream ffd294d346d1 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/20 02:27 upstream 9528d418de4d f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/18 10:10 upstream ad26fc09dabf f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/18 08:37 upstream ad26fc09dabf f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/15 21:39 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_root_node
2025/01/06 13:28 linux-next 8155b4ef3466 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btrfs_root_node
2025/02/09 02:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/08 22:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/08 16:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/08 13:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/07 17:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece a4f327c2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/06 15:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/06 06:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2014c95afece 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/03 02:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/02 23:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/02/02 19:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/28 11:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 18070896 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/27 23:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 18070896 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/27 07:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 9fbd772e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/24 08:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 521b0ce3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/22 11:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/19 20:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/19 02:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1950a0af2d55 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
2025/01/17 09:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6251d1776bc5 f9e07a6e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in btrfs_root_node
* Struck through repros no longer work on HEAD.