[v5.15] kernel BUG in btrfs_free_tree_block

0 views
Skip to first unread message

syzbot

unread,
Jul 2, 2023, 11:56:13 PM7/2/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4af60700a60c Linux 5.15.119
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11478c0ca80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f95d07036b0504a8
dashboard link: https://syzkaller.appspot.com/bug?extid=df51e4b53e70a282bdc6
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12441c2ca80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=103809e7280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1a4abe225b30/disk-4af60700.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c57a50e7d39b/vmlinux-4af60700.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c21012530aba/Image-4af60700.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d30f49e74288/mount_0.gz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-tree.c:3289!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4004 Comm: syz-executor274 Not tainted 5.15.119-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
lr : btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
sp : ffff80001cf46a60
x29: ffff80001cf46b80 x28: ffff0000dc49c2c0 x27: ffff80001cf46af0
x26: 00000000fffffff4 x25: 0000000000000001 x24: ffff0000d0a75290
x23: 0000000000000005 x22: ffff0000dc49c2c0 x21: ffff0000d0a75170
x20: 0000000000000001 x19: dfff800000000000 x18: 0000000000000001
x17: ff80800008335ea8 x16: ffff80001195eeac x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff80800009fc0804 x10: 0000000000000000 x9 : ffff800009fc0804
x8 : ffff0000c21c9b40 x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff80001cf45db8 x4 : 00000000000000a8 x3 : 0000000000000068
x2 : 0000000000000000 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
btrfs_free_tree_block+0xc08/0xdcc fs/btrfs/extent-tree.c:3289
__btrfs_cow_block+0xd94/0x1638 fs/btrfs/ctree.c:465
btrfs_cow_block+0x354/0x744 fs/btrfs/ctree.c:570
btrfs_search_slot+0xb50/0x24d8
btrfs_insert_empty_items+0x1e4/0x2ac fs/btrfs/ctree.c:3955
btrfs_insert_empty_item fs/btrfs/ctree.h:2930 [inline]
btrfs_insert_replace_extent+0x2fc/0xc04 fs/btrfs/file.c:2672
btrfs_replace_file_extents+0xb3c/0x1388 fs/btrfs/file.c:2954
btrfs_clone+0xe28/0x2318 fs/btrfs/reflink.c:492
btrfs_clone_files+0x278/0x31c fs/btrfs/reflink.c:740
btrfs_remap_file_range+0x4c8/0xc08 fs/btrfs/reflink.c:888
vfs_copy_file_range+0xd9c/0x1130 fs/read_write.c:1510
__do_sys_copy_file_range fs/read_write.c:1588 [inline]
__se_sys_copy_file_range fs/read_write.c:1551 [inline]
__arm64_sys_copy_file_range+0x5f8/0x9d8 fs/read_write.c:1551
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: c80a7e69 35ffffaa 17ffff2b 97940b7f (d4210000)
---[ end trace b225bffca5e8afe8 ]---


---
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