[v6.1] kernel BUG in clear_state_bit

0 views
Skip to first unread message

syzbot

unread,
Jun 24, 2023, 1:54:54 PM6/24/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e84a4e368abe Linux 6.1.35
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1079ee50a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f77b603a569f81a7
dashboard link: https://syzkaller.appspot.com/bug?extid=4063a2893e2b4f1ce6b5
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/30886a06f234/disk-e84a4e36.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/84ab10f3c74b/vmlinux-e84a4e36.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ea73248cc405/Image-e84a4e36.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+4063a2...@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:517!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 8784 Comm: syz-executor.0 Not tainted 6.1.35-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 : clear_state_bit+0x2cc/0x2d0 fs/btrfs/extent-io-tree.c:517
lr : clear_state_bit+0x2cc/0x2d0 fs/btrfs/extent-io-tree.c:517
sp : ffff80001fab7200
x29: ffff80001fab7200 x28: 0000000000000fff x27: ffff0000dc061608
x26: 0000000000000000 x25: dfff800000000000 x24: 0000000000001000
x23: 0000000000000fff x22: 00000000fffffff4 x21: 0000000000000000
x20: ffff00012ef64420 x19: ffff0000dc061600 x18: ffff80001fab6580
x17: 0000000000000000 x16: ffff8000121066e4 x15: 0000000000000000
x14: 0000000000000002 x13: 0000000000000001 x12: 0000000000040000
x11: 0000000000015c5e x10: ffff80001e4b9000 x9 : ffff80000a31f888
x8 : 0000000000015c5f x7 : 0000000000000001 x6 : 0000000000000001
x5 : 00000000ffffffff x4 : 0000000000000a20 x3 : 0000000000000a20
x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
clear_state_bit+0x2cc/0x2d0 fs/btrfs/extent-io-tree.c:517
__clear_extent_bit+0x594/0xb8c fs/btrfs/extent-io-tree.c:676
clear_record_extent_bits+0x64/0x98 fs/btrfs/extent-io-tree.c:1620
__btrfs_qgroup_release_data+0x3b8/0xa88 fs/btrfs/qgroup.c:3891
btrfs_qgroup_free_data+0x40/0x54 fs/btrfs/qgroup.c:3925
btrfs_invalidate_folio+0x574/0xa10 fs/btrfs/inode.c:8367
folio_invalidate mm/truncate.c:159 [inline]
truncate_cleanup_folio+0x174/0x2e0 mm/truncate.c:179
truncate_inode_pages_range+0x244/0xf10 mm/truncate.c:369
truncate_inode_pages mm/truncate.c:452 [inline]
truncate_pagecache mm/truncate.c:753 [inline]
truncate_setsize+0xd8/0x104 mm/truncate.c:778
btrfs_setsize fs/btrfs/inode.c:5212 [inline]
btrfs_setattr+0x54c/0xf30 fs/btrfs/inode.c:5251
notify_change+0xc24/0xec0 fs/attr.c:482
do_truncate+0x1c0/0x28c fs/open.c:65
do_sys_ftruncate+0x288/0x31c fs/open.c:193
__do_sys_ftruncate fs/open.c:204 [inline]
__se_sys_ftruncate fs/open.c:202 [inline]
__arm64_sys_ftruncate+0x60/0x74 fs/open.c:202
__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: aa1603e0 9799320f 17ffffb4 97876adf (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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

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

syzbot

unread,
Jun 24, 2023, 2:22:03 PM6/24/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: e84a4e368abe Linux 6.1.35
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14f1ea1b280000
kernel config: https://syzkaller.appspot.com/x/.config?x=f77b603a569f81a7
dashboard link: https://syzkaller.appspot.com/bug?extid=4063a2893e2b4f1ce6b5
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=17fd9950a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13c8d667280000
mounted in repro: https://storage.googleapis.com/syzbot-assets/fedb58b123e2/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+4063a2...@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:517!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4217 Comm: syz-executor146 Not tainted 6.1.35-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 : clear_state_bit+0x2cc/0x2d0 fs/btrfs/extent-io-tree.c:517
lr : clear_state_bit+0x2cc/0x2d0 fs/btrfs/extent-io-tree.c:517
sp : ffff80001dba7200
x29: ffff80001dba7200 x28: 0000000000000fff x27: ffff0000d159dc08
x26: 0000000000000000 x25: dfff800000000000 x24: 0000000000001000
x23: 0000000000000fff x22: 00000000fffffff4 x21: 0000000000000000
x20: ffff0000e2889400 x19: ffff0000d159dc00 x18: ffff80001dba6580
x17: 0000000000000000 x16: ffff8000121066e4 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
x11: ff8080000a31f888 x10: 0000000000000000 x9 : ffff80000a31f888
x8 : ffff0000de68b780 x7 : 0000000000000001 x6 : 0000000000000001
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.

syzbot

unread,
Jun 24, 2023, 4:08:52 PM6/24/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f67653019430 Linux 5.15.118
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1028bc77280000
kernel config: https://syzkaller.appspot.com/x/.config?x=c6daef03436a2bc5
dashboard link: https://syzkaller.appspot.com/bug?extid=51ab883f63134b0ac7ef
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=12cfd557280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1641f33f280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/600ef9372d32/disk-f6765301.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/46dca37198b3/vmlinux-f6765301.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7ae4a35a0a6d/Image-f6765301.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/03b44d6b0507/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+51ab88...@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_io.c:658!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3965 Comm: syz-executor688 Not tainted 5.15.118-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 : clear_state_bit+0x4f0/0x4f4 fs/btrfs/extent_io.c:658
lr : clear_state_bit+0x4f0/0x4f4 fs/btrfs/extent_io.c:658
sp : ffff80001a3571d0
x29: ffff80001a3571e0 x28: 0000000000001000 x27: dfff800000000000
x26: ffff0000df071460 x25: 0000000000000108 x24: 0000000000000000
x23: 0000000000000fff x22: 00000000fffffff4 x21: 0000000000000000
x20: 0000000000001000 x19: ffff0000ceac37d0 x18: 0000000000000002
x17: ff80800008335ea8 x16: ffff8000119547c4 x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000a073b80 x10: 0000000000000000 x9 : ffff80000a073b80
x8 : ffff0000c81b9b40 x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff80001a3565d8 x4 : 0000000000000100 x3 : 0000000000000a20
x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000
Call trace:
clear_state_bit+0x4f0/0x4f4 fs/btrfs/extent_io.c:658
__clear_extent_bit+0x630/0xcc0 fs/btrfs/extent_io.c:835
clear_record_extent_bits+0x70/0x98 fs/btrfs/extent_io.c:1450
__btrfs_qgroup_release_data+0x3c0/0x9b4 fs/btrfs/qgroup.c:3823
btrfs_qgroup_free_data+0x40/0x54 fs/btrfs/qgroup.c:3857
btrfs_invalidatepage+0x4f8/0x908 fs/btrfs/inode.c:8802
do_invalidatepage mm/truncate.c:157 [inline]
truncate_cleanup_page+0x15c/0x414 mm/truncate.c:176
truncate_inode_pages_range+0x254/0xbe0 mm/truncate.c:325
truncate_inode_pages mm/truncate.c:425 [inline]
truncate_pagecache mm/truncate.c:735 [inline]
truncate_setsize+0xd8/0x104 mm/truncate.c:760
btrfs_setsize fs/btrfs/inode.c:5429 [inline]
btrfs_setattr+0x6b8/0xe2c fs/btrfs/inode.c:5468
notify_change+0xac4/0xd60 fs/attr.c:488
do_truncate+0x1c0/0x28c fs/open.c:65
do_sys_ftruncate+0x288/0x31c fs/open.c:193
__do_sys_ftruncate fs/open.c:204 [inline]
__se_sys_ftruncate fs/open.c:202 [inline]
__arm64_sys_ftruncate+0x60/0x74 fs/open.c:202
__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: 97a15b60 f94007e8 17ffff30 97913d7c (d4210000)
---[ end trace 9c9cd73ae076729f ]---


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

Reply all
Reply to author
Forward
0 new messages