syzbot


WARNING in btrfs_get_root_ref

Status: upstream: reported syz repro on 2024/02/23 02:03
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+623a623cfed57f422be1@syzkaller.appspotmail.com
First crash: 62d, last: 43d
Cause bisection: introduced by (bisect log) [ignored commit]:
commit 4e2f02bf77dac7b8c841f93ae5a71556d733cb04
Author: Leonid Ravich <Leonid.Ravich@emc.com>
Date: Sun Jan 3 18:12:54 2021 +0000

  nvmet-fc: use RCU proctection for assoc_list

Crash: kernel BUG in btrfs_get_root_ref (log)
Repro: syz .config
  
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] WARNING in btrfs_get_root_ref 0 (2) 2024/02/23 06:04
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/03/08 09:24 22m retest repro upstream report log
2024/03/08 08:08 16m retest repro upstream OK log

Sample crash report:
------------[ cut here ]------------
ida_free called for id=46 which is not allocated.
WARNING: CPU: 0 PID: 5197 at lib/idr.c:525 ida_free+0x370/0x420 lib/idr.c:525
Modules linked in:
CPU: 0 PID: 5197 Comm: syz-executor.1 Not tainted 6.8.0-rc5-syzkaller-00121-g1c892cdd8fe0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:ida_free+0x370/0x420 lib/idr.c:525
Code: 10 42 80 3c 28 00 74 05 e8 7d 86 9b f6 48 8b 7c 24 40 4c 89 fe e8 a0 89 17 00 90 48 c7 c7 80 c9 c5 8c 89 de e8 21 72 fd f5 90 <0f> 0b 90 90 eb 3d e8 45 67 39 f6 49 bd 00 00 00 00 00 fc ff df 4d
RSP: 0018:ffffc90004a1f300 EFLAGS: 00010246
RAX: a25cdedaf9286500 RBX: 000000000000002e RCX: ffff888025b58000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90004a1f3f0 R08: ffffffff81577ab2 R09: 1ffff92000943db4
R10: dffffc0000000000 R11: fffff52000943db5 R12: 0000000000000246
R13: dffffc0000000000 R14: ffffffff8e256d00 R15: 0000000000000246
FS:  00007f51d0a726c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056090d5db000 CR3: 000000007b920000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 btrfs_get_root_ref+0xa48/0xaf0 fs/btrfs/disk-io.c:1346
 create_pending_snapshot+0xff2/0x2bc0 fs/btrfs/transaction.c:1837
 create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1931
 btrfs_commit_transaction+0xf1c/0x3740 fs/btrfs/transaction.c:2404
 create_snapshot+0x507/0x880 fs/btrfs/ioctl.c:848
 btrfs_mksubvol+0x5d0/0x750 fs/btrfs/ioctl.c:998
 btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1044
 __btrfs_ioctl_snap_create+0x387/0x4b0 fs/btrfs/ioctl.c:1306
 btrfs_ioctl_snap_create_v2+0x1ca/0x400 fs/btrfs/ioctl.c:1393
 btrfs_ioctl+0xa74/0xd40
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfe/0x170 fs/ioctl.c:857
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f51cfc7dda9
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:00007f51d0a720c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f51cfdabf80 RCX: 00007f51cfc7dda9
RDX: 00000000200005c0 RSI: 0000000050009417 RDI: 0000000000000003
RBP: 00007f51cfcca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f51cfdabf80 R15: 00007fff8ee6fb18
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/23 06:03 upstream 1c892cdd8fe0 8d446f15 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root WARNING in btrfs_get_root_ref
2024/02/23 07:37 upstream 1c892cdd8fe0 8d446f15 .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in btrfs_get_root_ref
2024/02/19 02:01 upstream c02197fc9076 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in btrfs_get_root_ref
* Struck through repros no longer work on HEAD.