[syzbot] [btrfs?] kernel BUG in write_all_supers
From: syzbot
Date: Thu Mar 27 2025 - 12:16:26 EST
Hello,
syzbot found the following issue on:
HEAD commit: f6e0150b2003 Merge tag 'mtd/for-6.15' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1405d804580000
kernel config: https://syzkaller.appspot.com/x/.config?x=46a07195688b794b
dashboard link: https://syzkaller.appspot.com/bug?extid=34122898a11ab689518a
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10d7abb0580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15d76198580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-f6e0150b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ade4c34c9b1/vmlinux-f6e0150b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1fe37b97ec9d/bzImage-f6e0150b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/1f4c759fe772/mount_0.gz
fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=1757abb0580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+34122898a11ab689518a@xxxxxxxxxxxxxxxxxxxxxxxxx
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
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup