syzbot


kernel BUG in btrfs_recover_relocation

Status: upstream: reported C repro on 2024/09/19 14:28
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+4be543bf197a0325c7d9@syzkaller.appspotmail.com
First crash: 66d, last: 28d
Cause bisection: introduced by (bisect log) :
commit ad21f15b0f795daf8723dddbcb61797d4f1c2aed
Author: Josef Bacik <josef@toxicpanda.com>
Date: Wed Nov 22 17:17:50 2023 +0000

  btrfs: switch to the new mount API

Crash: BUG: unable to handle kernel NULL pointer dereference in write_all_supers (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in btrfs_recover_relocation 1 (3) 2024/09/19 23:04
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/10/15 14:22 13m retest repro upstream report log
2024/10/01 12:51 16m retest repro upstream report log
2024/09/19 21:37 21m quwenruo.btrfs@gmx.com https://github.com/adam900710/linux.git syzbot_rorw OK log

Sample crash report:
BTRFS info (device loop0 state MC): resize thread pool 2097158 -> 4
assertion failed: fs_root, in fs/btrfs/relocation.c:4375
------------[ cut here ]------------
kernel BUG at fs/btrfs/relocation.c:4375!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5226 Comm: syz-executor261 Not tainted 6.11.0-rc7-syzkaller-00151-gd42f7708e27c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:btrfs_recover_relocation+0x1b6f/0x1ba0 fs/btrfs/relocation.c:4375
Code: 40 d1 fd eb 05 e8 c1 40 d1 fd 48 c7 c7 60 51 2d 8c 48 c7 c6 e0 52 2d 8c 48 c7 c2 e0 51 2d 8c b9 17 11 00 00 e8 02 ce eb 07 90 <0f> 0b e8 9a 40 d1 fd 48 c7 c7 60 51 2d 8c 48 c7 c6 00 52 2d 8c 48
RSP: 0018:ffffc900033e76a0 EFLAGS: 00010246
RAX: 0000000000000038 RBX: ffff88802918c048 RCX: 8c13e04592c8c800
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900033e7830 R08: ffffffff8174016c R09: fffffbfff1cba0e0
R10: dffffc0000000000 R11: fffffbfff1cba0e0 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffc900033e77a0 R15: ffff888027a8d160
FS:  000055557fadc380(0000) GS:ffff8880b8900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200011c8 CR3: 00000000693e0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_start_pre_rw_mount+0xe15/0x1300 fs/btrfs/disk-io.c:3048
 btrfs_remount_rw fs/btrfs/super.c:1309 [inline]
 btrfs_reconfigure+0xae6/0x2d40 fs/btrfs/super.c:1534
 btrfs_reconfigure_for_mount fs/btrfs/super.c:2020 [inline]
 btrfs_get_tree_subvol fs/btrfs/super.c:2079 [inline]
 btrfs_get_tree+0x918/0x1920 fs/btrfs/super.c:2115
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 do_new_mount+0x2be/0xb40 fs/namespace.c:3472
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3997
 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:0x7efc59f9fed9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff486e20c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efc59f9fed9
RDX: 0000000020001240 RSI: 0000000020001200 RDI: 00000000200011c0
RBP: 00007efc5a0195f0 R08: 0000000000000000 R09: 000055557fadd4c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff486e20f0
R13: 00007fff486e2318 R14: 431bde82d7b634db R15: 00007efc59fe903b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_recover_relocation+0x1b6f/0x1ba0 fs/btrfs/relocation.c:4375
Code: 40 d1 fd eb 05 e8 c1 40 d1 fd 48 c7 c7 60 51 2d 8c 48 c7 c6 e0 52 2d 8c 48 c7 c2 e0 51 2d 8c b9 17 11 00 00 e8 02 ce eb 07 90 <0f> 0b e8 9a 40 d1 fd 48 c7 c7 60 51 2d 8c 48 c7 c6 00 52 2d 8c 48
RSP: 0018:ffffc900033e76a0 EFLAGS: 00010246
RAX: 0000000000000038 RBX: ffff88802918c048 RCX: 8c13e04592c8c800
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900033e7830 R08: ffffffff8174016c R09: fffffbfff1cba0e0
R10: dffffc0000000000 R11: fffffbfff1cba0e0 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffc900033e77a0 R15: ffff888027a8d160
FS:  000055557fadc380(0000) GS:ffff8880b8900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000556f055030d8 CR3: 00000000693e0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/15 14:25 upstream d42f7708e27c 08d8a733 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in btrfs_recover_relocation
2024/09/17 12:49 upstream a430d95c5efa c673ca06 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in btrfs_recover_relocation
2024/10/23 22:34 upstream c2ee9f594da8 15fa2979 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in btrfs_recover_relocation
* Struck through repros no longer work on HEAD.