[moderation] [bcachefs?] general protection fault in bch2_check_allocations

0 views
Skip to first unread message

syzbot

unread,
Jun 8, 2024, 12:45:30 PMJun 8
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 234cb065ad82 Add linux-next specific files for 20240605
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16bdd474980000
kernel config: https://syzkaller.appspot.com/x/.config?x=fc762e458631913
dashboard link: https://syzkaller.appspot.com/bug?extid=2044b84f690d1f0f333f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [bfo...@redhat.com kent.ov...@linux.dev linux-b...@vger.kernel.org linux-...@vger.kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f0492dc0386a/disk-234cb065.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/490224339088/vmlinux-234cb065.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5843c0673606/bzImage-234cb065.xz

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

bcachefs (loop1): stripes_read... done
bcachefs (loop1): snapshots_read... done
bcachefs (loop1): check_allocations...
bcachefs (loop1): bch2_dev_usage_init(): error ENOMEM_disk_accounting
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 0 PID: 6556 Comm: syz-executor.1 Tainted: G W 6.10.0-rc2-next-20240605-syzkaller #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:bch2_alloc_write_key fs/bcachefs/btree_gc.c:778 [inline]
RIP: 0010:bch2_gc_alloc_done fs/bcachefs/btree_gc.c:864 [inline]
RIP: 0010:bch2_check_allocations+0x2958/0xb9d0 fs/bcachefs/btree_gc.c:1129
Code: 0f b6 04 38 84 c0 0f 85 77 1d 00 00 48 8b b4 24 9c 07 00 00 48 89 df e8 26 01 01 00 48 89 c3 48 8d 78 01 48 89 f8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 0f 85 6c 1d 00 00 4c 89 b4 24 f8 00 00 00 44
RSP: 0018:ffffc900034de240 EFLAGS: 00010202
RAX: 0000000000000004 RBX: 0000000000000020 RCX: 0000000000040000
RDX: ffffc90009dcc000 RSI: 000000000003ffff RDI: 0000000000000021
RBP: ffffc900034df088 R08: ffffffff840fb171 R09: 1ffffffff25f8704
R10: dffffc0000000000 R11: fffffbfff25f8705 R12: ffffc900034de8ec
R13: ffffc900034de8f8 R14: ffffc900034de9e3 R15: dffffc0000000000
FS: 00007ff5695de6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7c248e66e4 CR3: 0000000022dac000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:183
bch2_run_recovery_passes+0x19e/0x820 fs/bcachefs/recovery_passes.c:226
bch2_fs_recovery+0x238b/0x3730 fs/bcachefs/recovery.c:846
bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1017
bch2_fs_open+0xa8d/0xdf0 fs/bcachefs/super.c:2113
bch2_mount fs/bcachefs/fs.c:1908 [inline]
bch2_fs_get_tree+0x75e/0x14d0 fs/bcachefs/fs.c:2069
vfs_get_tree+0x90/0x2a0 fs/super.c:1780
do_new_mount+0x2be/0xb40 fs/namespace.c:3352
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff56887e5ea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007ff5695ddef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ff5695ddf80 RCX: 00007ff56887e5ea
RDX: 0000000020000000 RSI: 0000000020000700 RDI: 00007ff5695ddf40
RBP: 0000000020000000 R08: 00007ff5695ddf80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000700
R13: 00007ff5695ddf40 R14: 0000000000005b69 R15: 0000000020000200
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_alloc_write_key fs/bcachefs/btree_gc.c:778 [inline]
RIP: 0010:bch2_gc_alloc_done fs/bcachefs/btree_gc.c:864 [inline]
RIP: 0010:bch2_check_allocations+0x2958/0xb9d0 fs/bcachefs/btree_gc.c:1129
Code: 0f b6 04 38 84 c0 0f 85 77 1d 00 00 48 8b b4 24 9c 07 00 00 48 89 df e8 26 01 01 00 48 89 c3 48 8d 78 01 48 89 f8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 0f 85 6c 1d 00 00 4c 89 b4 24 f8 00 00 00 44
RSP: 0018:ffffc900034de240 EFLAGS: 00010202
RAX: 0000000000000004 RBX: 0000000000000020 RCX: 0000000000040000
RDX: ffffc90009dcc000 RSI: 000000000003ffff RDI: 0000000000000021
RBP: ffffc900034df088 R08: ffffffff840fb171 R09: 1ffffffff25f8704
R10: dffffc0000000000 R11: fffffbfff25f8705 R12: ffffc900034de8ec
R13: ffffc900034de8f8 R14: ffffc900034de9e3 R15: dffffc0000000000
FS: 00007ff5695de6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7c248e66e4 CR3: 0000000022dac000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 0f b6 04 38 movzbl (%rax,%rdi,1),%eax
4: 84 c0 test %al,%al
6: 0f 85 77 1d 00 00 jne 0x1d83
c: 48 8b b4 24 9c 07 00 mov 0x79c(%rsp),%rsi
13: 00
14: 48 89 df mov %rbx,%rdi
17: e8 26 01 01 00 call 0x10142
1c: 48 89 c3 mov %rax,%rbx
1f: 48 8d 78 01 lea 0x1(%rax),%rdi
23: 48 89 f8 mov %rdi,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 6c 1d 00 00 jne 0x1da3
37: 4c 89 b4 24 f8 00 00 mov %r14,0xf8(%rsp)
3e: 00
3f: 44 rex.R


---
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 report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

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