syzbot


kernel BUG in bch2_ioctl_fsck_online

Status: fixed on 2024/07/13 18:41
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+ad60312dc46671a69480@syzkaller.appspotmail.com
Fix commit: 9bd01500e4d8 bcachefs: Fix freeing of error pointers
First crash: 111d, last: 111d
Cause bisection: introduced by (bisect log) :
commit f7643bc9749f270d487c32dc35b578575bf1adb0
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Wed Apr 17 05:26:02 2024 +0000

  bcachefs: make btree read errors silent during scan

Crash: kernel BUG in bch2_ioctl_fsck_online (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_ioctl_fsck_online 1 (2) 2024/06/22 21:23

Sample crash report:
bcachefs (loop0): done starting filesystem
------------[ cut here ]------------
kernel BUG at arch/x86/mm/physaddr.c:23!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 PID: 5078 Comm: syz-executor269 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:__phys_addr+0x16a/0x170 arch/x86/mm/physaddr.c:23
Code: a0 59 1a 8e 4c 89 f6 4c 89 fa e8 31 3d 9e 03 e9 45 ff ff ff e8 b7 d9 53 00 90 0f 0b e8 af d9 53 00 90 0f 0b e8 a7 d9 53 00 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900032bef38 EFLAGS: 00010293
RAX: ffffffff81424c69 RBX: 000000007ffffff2 RCX: ffff888023c99e00
RDX: 0000000000000000 RSI: 000000007ffffff2 RDI: 000000001fffffff
RBP: ffffc900032bf050 R08: ffffffff81424c05 R09: 0000000000000000
R10: ffff888023817220 R11: ffffed1004702e58 R12: ffff888023817000
R13: fffffffffffffff2 R14: 000000007ffffff2 R15: ffff888023817220
FS:  000055557cb96380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdb44fbf78 CR3: 0000000022c2c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 virt_to_folio include/linux/mm.h:1313 [inline]
 kfree+0x71/0x360 mm/slub.c:4550
 bch2_ioctl_fsck_online+0x404/0x660 fs/bcachefs/chardev.c:853
 bch2_fs_ioctl+0x1c3c/0x37d0 fs/bcachefs/chardev.c:927
 bch2_fs_file_ioctl+0x870/0x26e0 fs/bcachefs/fs-ioctl.c:532
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
 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:0x7f375bb1b979
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 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:00007ffcd0a34128 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffcd0a342f8 RCX: 00007f375bb1b979
RDX: 0000000020000000 RSI: 000000004010bc14 RDI: 0000000000000004
RBP: 00007f375bba0610 R08: 0000000000000000 R09: 00007ffcd0a342f8
R10: 00000000000119f4 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcd0a342e8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__phys_addr+0x16a/0x170 arch/x86/mm/physaddr.c:23
Code: a0 59 1a 8e 4c 89 f6 4c 89 fa e8 31 3d 9e 03 e9 45 ff ff ff e8 b7 d9 53 00 90 0f 0b e8 af d9 53 00 90 0f 0b e8 a7 d9 53 00 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900032bef38 EFLAGS: 00010293
RAX: ffffffff81424c69 RBX: 000000007ffffff2 RCX: ffff888023c99e00
RDX: 0000000000000000 RSI: 000000007ffffff2 RDI: 000000001fffffff
RBP: ffffc900032bf050 R08: ffffffff81424c05 R09: 0000000000000000
R10: ffff888023817220 R11: ffffed1004702e58 R12: ffff888023817000
R13: fffffffffffffff2 R14: 000000007ffffff2 R15: ffff888023817220
FS:  000055557cb96380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdb44fbf78 CR3: 0000000022c2c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/18 20:27 upstream 2ccbdf43d5e7 639d6cdf .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_ioctl_fsck_online
2024/06/18 20:10 upstream 2ccbdf43d5e7 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_ioctl_fsck_online
2024/06/18 20:10 upstream 2ccbdf43d5e7 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_ioctl_fsck_online
* Struck through repros no longer work on HEAD.