bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 10 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 10 bcachefs (loop0): unclean shutdown complete, journal seq 10 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/bcachefs/sb-downgrade.c:276:4 index 0 is out of range for type '__le16[] __counted_by(nr_errors)' (aka 'unsigned short[]') CPU: 0 UID: 0 PID: 5304 Comm: kworker/0:3 Not tainted 6.15.0-syzkaller-12426-ge271ed52b344 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_long bch2_fs_read_only_work Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 ubsan_epilogue+0xa/0x40 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xe9/0xf0 lib/ubsan.c:455 downgrade_table_extra fs/bcachefs/sb-downgrade.c:276 [inline] bch2_sb_downgrade_update+0xb69/0xf00 fs/bcachefs/sb-downgrade.c:399 bch2_write_super+0xc24/0x2d30 fs/bcachefs/super-io.c:1081 bch2_fs_read_only+0x71c/0xb00 fs/bcachefs/super.c:402 bch2_fs_read_only_work+0x2d/0x40 fs/bcachefs/super.c:415 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 ---[ end trace ]--- Kernel panic - not syncing: UBSAN: panic_on_warn set ... CPU: 0 UID: 0 PID: 5304 Comm: kworker/0:3 Not tainted 6.15.0-syzkaller-12426-ge271ed52b344 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_long bch2_fs_read_only_work Call Trace: dump_stack_lvl+0x99/0x250 lib/dump_stack.c:120 panic+0x2db/0x790 kernel/panic.c:382 check_panic_on_warn+0x89/0xb0 kernel/panic.c:273 __ubsan_handle_out_of_bounds+0xe9/0xf0 lib/ubsan.c:455 downgrade_table_extra fs/bcachefs/sb-downgrade.c:276 [inline] bch2_sb_downgrade_update+0xb69/0xf00 fs/bcachefs/sb-downgrade.c:399 bch2_write_super+0xc24/0x2d30 fs/bcachefs/super-io.c:1081 bch2_fs_read_only+0x71c/0xb00 fs/bcachefs/super.c:402 bch2_fs_read_only_work+0x2d/0x40 fs/bcachefs/super.c:415 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Kernel Offset: disabled