[v6.1] kernel BUG in insert_state_fast

1 view
Skip to first unread message

syzbot

unread,
Apr 8, 2023, 4:40:51 AM4/8/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 543aff194ab6 Linux 6.1.23
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=121c0eabc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9ccbc3d5467efd1
dashboard link: https://syzkaller.appspot.com/bug?extid=a82fd6d6c6330d9f4b32
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7fe538fc87bf/disk-543aff19.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8df93997601a/vmlinux-543aff19.xz
kernel image: https://storage.googleapis.com/syzbot-assets/03ad7e3bf859/Image-543aff19.gz.xz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:381!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 25516 Comm: syz-executor.0 Not tainted 6.1.23-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
pc : insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
lr : set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
lr : insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
sp : ffff8000221b6cd0
x29: ffff8000221b6cd0 x28: ffff000131ddb0e0 x27: 0000000000000000
x26: dfff800000000000 x25: 0000000000001fff x24: 00000000fffffff4
x23: 0000000000001000 x22: 0000000000000000 x21: ffff000131ddb0e0
x20: ffff000131ddb0e0 x19: ffff000141fa6b40 x18: ffff8000221b6040
x17: 0000000000000000 x16: ffff8000120db8f4 x15: 0000000000000000
x14: 0000000000000002 x13: fffffffffffca820 x12: 0000000000040000
x11: 0000000000018a34 x10: ffff80001fe9c000 x9 : ffff80000a319a84
x8 : 0000000000018a35 x7 : fffffffffffca820 x6 : fffffffffffca7e0
x5 : 00000000ffffffff x4 : 0000000000000a20 x3 : 0000000000000a20
x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
__set_extent_bit+0x10f4/0x1650 fs/btrfs/extent-io-tree.c:1000
set_record_extent_bits+0x68/0x98 fs/btrfs/extent-io-tree.c:1607
qgroup_reserve_data+0x214/0x90c fs/btrfs/qgroup.c:3767
btrfs_qgroup_reserve_data+0x40/0xec fs/btrfs/qgroup.c:3810
btrfs_check_data_free_space+0x130/0x20c fs/btrfs/delalloc-space.c:152
btrfs_buffered_write+0x4ac/0xfec fs/btrfs/file.c:1242
btrfs_direct_write fs/btrfs/file.c:1582 [inline]
btrfs_do_write_iter+0xc04/0xf20 fs/btrfs/file.c:1663
btrfs_file_write_iter+0x2c/0x3c fs/btrfs/file.c:1687
do_iter_write+0x534/0x964 fs/read_write.c:861
vfs_iter_write+0x88/0xac fs/read_write.c:902
iter_file_splice_write+0x618/0xc48 fs/splice.c:686
do_splice_from fs/splice.c:764 [inline]
direct_splice_actor+0xe4/0x1c0 fs/splice.c:931
splice_direct_to_actor+0x3c4/0x944 fs/splice.c:886
do_splice_direct+0x1f4/0x334 fs/splice.c:974
generic_copy_file_range fs/read_write.c:1393 [inline]
vfs_copy_file_range+0xa04/0x1228 fs/read_write.c:1539
__do_sys_copy_file_range fs/read_write.c:1596 [inline]
__se_sys_copy_file_range fs/read_write.c:1559 [inline]
__arm64_sys_copy_file_range+0x578/0x914 fs/read_write.c:1559
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: aa1903e0 97992e58 17ffffa0 9787699f (d4210000)
---[ end trace 0000000000000000 ]---


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

syzbot

unread,
May 27, 2023, 6:53:57 PM5/27/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16bbbab9280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8ec86bd749598dca
dashboard link: https://syzkaller.appspot.com/bug?extid=a82fd6d6c6330d9f4b32
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=13f8ed6d280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12ec4525280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/aebc00d6f042/disk-a343b0dd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ff0321ebb5a/vmlinux-a343b0dd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c928974a56d6/Image-a343b0dd.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/5054cf07b9da/mount_0.gz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:381!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4222 Comm: syz-executor229 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
pc : insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
lr : set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
lr : insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
sp : ffff80001d8c73b0
x29: ffff80001d8c73b0 x28: ffff0000df3a9da0 x27: 0000000000000000
x26: dfff800000000000 x25: 0000000000000fff x24: 00000000fffffff4
x23: 0000000000001000 x22: 0000000000000000 x21: ffff0000df3a9da0
x20: ffff0000df3a9da0 x19: ffff0000dd46f900 x18: ffff80001d8c6720
x17: 0000000000000000 x16: ffff8000120fc834 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
x11: ff8080000a322f70 x10: 0000000000000000 x9 : ffff80000a322f70
x8 : ffff0000d7d85340 x7 : 0000000000000001 x6 : 0000000000000001
x5 : 00000000ffffffff x4 : 0000000000000a20 x3 : 0000000000000a20
x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
set_state_bits fs/btrfs/extent-io-tree.c:381 [inline]
insert_state_fast+0x220/0x224 fs/btrfs/extent-io-tree.c:439
__set_extent_bit+0x10f4/0x1650 fs/btrfs/extent-io-tree.c:1000
set_record_extent_bits+0x68/0x98 fs/btrfs/extent-io-tree.c:1607
qgroup_reserve_data+0x214/0x90c fs/btrfs/qgroup.c:3767
btrfs_qgroup_reserve_data+0x40/0xec fs/btrfs/qgroup.c:3810
btrfs_check_data_free_space+0x130/0x20c fs/btrfs/delalloc-space.c:152
btrfs_buffered_write+0x4ac/0xfec fs/btrfs/file.c:1242
btrfs_direct_write fs/btrfs/file.c:1582 [inline]
btrfs_do_write_iter+0xc04/0xf20 fs/btrfs/file.c:1663
btrfs_file_write_iter+0x2c/0x3c fs/btrfs/file.c:1687
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x610/0x914 fs/read_write.c:584
ksys_write+0x15c/0x26c fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:646
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: aa1903e0 9799281e 17ffffa0 97875d06 (d4210000)
---[ end trace 0000000000000000 ]---


---
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.
Reply all
Reply to author
Forward
0 new messages