syzbot


kernel BUG in write_all_supers

Status: upstream: reported C repro on 2025/03/27 16:15
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+34122898a11ab689518a@syzkaller.appspotmail.com
First crash: 6d20h, last: 2h57m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in write_all_supers 2 (3) 2025/03/27 21:04

Sample crash report:
BTRFS info (device loop0): using sha256 (sha256-avx2) checksum algorithm
BTRFS info (device loop0): using free-space-tree
assertion failed: folio_order(folio) == 0, in fs/btrfs/disk-io.c:3858
------------[ cut here ]------------
kernel BUG at fs/btrfs/disk-io.c:3858!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 6730 Comm: syz-executor378 Not tainted 6.14.0-syzkaller-03565-gf6e0150b2003 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:write_dev_supers fs/btrfs/disk-io.c:3858 [inline]
RIP: 0010:write_all_supers+0x400f/0x4090 fs/btrfs/disk-io.c:4155
Code: 21 fe 90 0f 0b e8 01 ff d5 fd 48 c7 c7 00 3f 6c 8c 48 c7 c6 40 88 6c 8c 48 c7 c2 80 3f 6c 8c b9 12 0f 00 00 e8 92 8c 39 fd 90 <0f> 0b e8 da fe d5 fd 4c 89 f7 48 c7 c6 c0 72 6c 8c e8 6b 4d 21 fe
RSP: 0018:ffffc9000d7df580 EFLAGS: 00010246
RAX: 0000000000000045 RBX: 0000000000000002 RCX: 0e7dfa980dce5500
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc9000d7df950 R08: ffffffff81a2ae7c R09: 1ffff92001afbe4c
R10: dffffc0000000000 R11: fffff52001afbe4d R12: ffffea0001395708
R13: 1ffffd4000272ae1 R14: 1ffffd4000272ae0 R15: ffffea0001395700
FS:  00007f5ad16c86c0(0000) GS:ffff88808c824000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000004039a000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 btrfs_commit_transaction+0x1eda/0x3750 fs/btrfs/transaction.c:2528
 btrfs_quota_enable+0xfcc/0x21a0 fs/btrfs/qgroup.c:1226
 btrfs_ioctl_quota_ctl+0x144/0x1c0 fs/btrfs/ioctl.c:3677
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:892
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5ad1f20289
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 1d 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:00007f5ad16c8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5ad1fa7728 RCX: 00007f5ad1f20289
RDX: 00002000000000c0 RSI: 00000000c0109428 RDI: 0000000000000003
RBP: 00007f5ad1fa7720 R08: 00007f5ad16c86c0 R09: 0000000000000000
R10: 0000000000005598 R11: 0000000000000246 R12: 00007f5ad1fa772c
R13: 000000000000000b R14: 00007ffcbc9201a0 R15: 00007ffcbc920288
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:write_dev_supers fs/btrfs/disk-io.c:3858 [inline]
RIP: 0010:write_all_supers+0x400f/0x4090 fs/btrfs/disk-io.c:4155
Code: 21 fe 90 0f 0b e8 01 ff d5 fd 48 c7 c7 00 3f 6c 8c 48 c7 c6 40 88 6c 8c 48 c7 c2 80 3f 6c 8c b9 12 0f 00 00 e8 92 8c 39 fd 90 <0f> 0b e8 da fe d5 fd 4c 89 f7 48 c7 c6 c0 72 6c 8c e8 6b 4d 21 fe
RSP: 0018:ffffc9000d7df580 EFLAGS: 00010246
RAX: 0000000000000045 RBX: 0000000000000002 RCX: 0e7dfa980dce5500
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc9000d7df950 R08: ffffffff81a2ae7c R09: 1ffff92001afbe4c
R10: dffffc0000000000 R11: fffff52001afbe4d R12: ffffea0001395708
R13: 1ffffd4000272ae1 R14: 1ffffd4000272ae0 R15: ffffea0001395700
FS:  00007f5ad16c86c0(0000) GS:ffff88808c824000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5aca0e8000 CR3: 000000004039a000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/27 09:23 upstream f6e0150b2003 20510e88 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/25 11:00 upstream 2f2d52945852 875573af .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2] [mounted in repro #3 (corrupt fs)] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/04/01 01:03 upstream 609706855d90 36d76a97 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/31 18:29 upstream 4e82c87058f4 d3999433 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/31 11:42 upstream 4e82c87058f4 d3999433 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/30 02:03 upstream 7d06015d936c d3999433 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/27 07:58 upstream f6e0150b2003 20510e88 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/25 09:34 upstream 2f2d52945852 875573af .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/25 09:33 upstream 2f2d52945852 875573af .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
2025/03/25 07:09 upstream 2f2d52945852 875573af .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in write_all_supers
* Struck through repros no longer work on HEAD.