[v6.1] kernel BUG in btrfs_free_tree_block

0 views
Skip to first unread message

syzbot

unread,
Aug 12, 2023, 5:44:55 PM8/12/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1321ab403b38 Linux 6.1.45
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1118db63a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=5afeea223ff7d6fa
dashboard link: https://syzkaller.appspot.com/bug?extid=f53e1aed131332f2003c
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=13920a03a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1356e56fa80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/df0f614deffc/disk-1321ab40.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/df0f1be30831/vmlinux-1321ab40.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9e190f335ac9/bzImage-1321ab40.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/0a01719e6e9e/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f53e1a...@syzkaller.appspotmail.com

RDX: 00000000200003c0 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 0000000000000002 R08: 00007fffdaebcbb6 R09: 0000000000003233
R10: 0000000000000002 R11: 0000000000000246 R12: 00007fffdaebce70
R13: 00007fffdaebd0f8 R14: 431bde82d7b634db R15: 00007faafd2a701d
</TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-tree.c:3277!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3549 Comm: syz-executor256 Not tainted 6.1.45-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:btrfs_free_tree_block+0xd1b/0xd20 fs/btrfs/extent-tree.c:3277
Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 a4 87 60 fe e9 7e f8 ff ff e8 8a cb 04 07 e8 35 f4 09 fe <0f> 0b 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 f7
RSP: 0018:ffffc90003bdf4c0 EFLAGS: 00010293
RAX: ffffffff838009cb RBX: 00000000fffffff4 RCX: ffff88807d2d0000
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc90003bdf610 R08: ffffffff83800025 R09: fffffbfff1a4365b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880241e4120
R13: dffffc0000000000 R14: 0000000000000001 R15: ffffc90003bdf540
FS: 00005555557fe480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000076d3a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__btrfs_cow_block+0xe79/0x1970 fs/btrfs/ctree.c:488
btrfs_cow_block+0x3df/0x7d0 fs/btrfs/ctree.c:593
btrfs_search_slot+0xbe5/0x2f00 fs/btrfs/ctree.c:2041
btrfs_insert_empty_items+0x98/0x180 fs/btrfs/ctree.c:4139
btrfs_insert_empty_item fs/btrfs/ctree.h:3130 [inline]
insert_balance_item+0x2c8/0x20b0 fs/btrfs/volumes.c:3488
btrfs_balance+0x98a/0x10c0 fs/btrfs/volumes.c:4387
btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:4488
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7faafd25e699
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:00007fffdaebce18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fffdaebce20 RCX: 00007faafd25e699
RDX: 00000000200003c0 RSI: 00000000c4009420 RDI: 0000000000000004
RBP: 0000000000000002 R08: 00007fffdaebcbb6 R09: 0000000000003233
R10: 0000000000000002 R11: 0000000000000246 R12: 00007fffdaebce70
R13: 00007fffdaebd0f8 R14: 431bde82d7b634db R15: 00007faafd2a701d
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_free_tree_block+0xd1b/0xd20 fs/btrfs/extent-tree.c:3277
Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 a4 87 60 fe e9 7e f8 ff ff e8 8a cb 04 07 e8 35 f4 09 fe <0f> 0b 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 f7
RSP: 0018:ffffc90003bdf4c0 EFLAGS: 00010293
RAX: ffffffff838009cb RBX: 00000000fffffff4 RCX: ffff88807d2d0000
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: ffffc90003bdf610 R08: ffffffff83800025 R09: fffffbfff1a4365b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880241e4120
R13: dffffc0000000000 R14: 0000000000000001 R15: ffffc90003bdf540
FS: 00005555557fe480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000076d3a000 CR4: 00000000003506f0
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages