bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): check_alloc_info... done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_btree_backpointers... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... done bcachefs (loop0): check_alloc_to_lru_refs... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): check_snapshot_trees... done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_subvol_children... done bcachefs (loop0): delete_dead_snapshots... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_extents... done bcachefs (loop0): check_indirect_extents... done bcachefs (loop0): check_dirents... done bcachefs (loop0): check_xattrs... done bcachefs (loop0): check_root... done bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): done starting filesystem bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 30 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 30 bcachefs (loop0): clean shutdown complete, journal seq 31 bcachefs (loop0): marking filesystem clean ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= bcachefs (loop0): shutting down bcachefs: bch2_fs_get_tree() error: EBUSY Zero length message leads to an empty skb bcachefs (loop0): shutting down ================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 Read of size 1 at addr ffff888031f4d270 by task syz.0.0/5331 CPU: 0 UID: 0 PID: 5331 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-10892-g4e82c87058f4 #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 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 __kasan_check_byte+0x2c/0x40 mm/kasan/common.c:557 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire+0x89/0x2f0 kernel/locking/lockdep.c:5840 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] lockref_get+0x15/0x60 lib/lockref.c:50 dget include/linux/dcache.h:351 [inline] simple_recursive_removal+0x35/0x8f0 fs/libfs.c:610 debugfs_remove+0x49/0x70 fs/debugfs/inode.c:805 __bch2_fs_stop+0x292/0x5b0 fs/bcachefs/super.c:640 generic_shutdown_super+0x139/0x2d0 fs/super.c:642 bch2_kill_sb+0x41/0x50 fs/bcachefs/fs.c:2302 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x422/0x4c0 fs/namespace.c:1435 task_work_run+0x251/0x310 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa11/0x2950 kernel/exit.c:954 do_group_exit+0x207/0x2c0 kernel/exit.c:1103 get_signal+0x1696/0x1730 kernel/signal.c:3035 arch_do_signal_or_restart+0x98/0x840 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7e6b98d169 Code: Unable to access opcode bytes at 0x7f7e6b98d13f. RSP: 002b:00007f7e6c82c0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 00007f7e6bba5fa8 RCX: 00007f7e6b98d169 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f7e6bba5fac RBP: 00007f7e6bba5fa0 R08: 7fffffffffffffff R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f7e6bba5fac R13: 0000000000000000 R14: 00007fffc5712500 R15: 00007fffc57125e8 Allocated by task 5331: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4138 [inline] slab_alloc_node mm/slub.c:4187 [inline] kmem_cache_alloc_lru_noprof+0x1e5/0x390 mm/slub.c:4206 __d_alloc+0x31/0x740 fs/dcache.c:1681 d_alloc fs/dcache.c:1760 [inline] d_alloc_parallel+0xe9/0x1660 fs/dcache.c:2525 __lookup_slow+0x127/0x400 fs/namei.c:1792 lookup_one_len+0x1f3/0x310 fs/namei.c:2920 start_creating+0x187/0x310 fs/debugfs/inode.c:391 debugfs_create_dir+0x25/0x430 fs/debugfs/inode.c:586 bch2_fs_debug_init+0xde/0x4a0 fs/bcachefs/debug.c:931 bch2_fs_online+0x291/0x6a0 fs/bcachefs/super.c:709 bch2_fs_alloc fs/bcachefs/super.c:971 [inline] bch2_fs_open+0x322a/0x32a0 fs/bcachefs/super.c:2182 bch2_fs_get_tree+0x77b/0x18d0 fs/bcachefs/fs.c:2172 vfs_get_tree+0x90/0x2b0 fs/super.c:1759 do_new_mount+0x2cf/0xb70 fs/namespace.c:3878 do_mount fs/namespace.c:4218 [inline] __do_sys_mount fs/namespace.c:4429 [inline] __se_sys_mount+0x38c/0x400 fs/namespace.c:4406 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2376 [inline] slab_free mm/slub.c:4633 [inline] kmem_cache_free+0x197/0x410 mm/slub.c:4735 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0xaac/0x17a0 kernel/rcu/tree.c:2824 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:579 run_ksoftirqd+0xcf/0x130 kernel/softirq.c:968 smpboot_thread_fn+0x576/0xaa0 kernel/smpboot.c:164 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbf/0xd0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3082 [inline] call_rcu+0x172/0xad0 kernel/rcu/tree.c:3202 __dentry_kill+0x497/0x630 fs/dcache.c:679 dput+0x19f/0x2b0 fs/dcache.c:902 debugfs_remove+0x49/0x70 fs/debugfs/inode.c:805 __bch2_fs_stop+0x292/0x5b0 fs/bcachefs/super.c:640 bch2_fs_get_tree+0xd39/0x18d0 fs/bcachefs/fs.c:2293 vfs_get_tree+0x90/0x2b0 fs/super.c:1759 do_new_mount+0x2cf/0xb70 fs/namespace.c:3878 do_mount fs/namespace.c:4218 [inline] __do_sys_mount fs/namespace.c:4429 [inline] __se_sys_mount+0x38c/0x400 fs/namespace.c:4406 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888031f4d1a0 which belongs to the cache dentry of size 312 The buggy address is located 208 bytes inside of freed 312-byte region [ffff888031f4d1a0, ffff888031f4d2d8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x31f4c head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880369ea801 ksm flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88801c2a18c0 ffffea00010fd480 dead000000000003 raw: 0000000000000000 0000000000150015 00000000f5000000 ffff8880369ea801 head: 04fff00000000040 ffff88801c2a18c0 ffffea00010fd480 dead000000000003 head: 0000000000000000 0000000000150015 00000000f5000000 ffff8880369ea801 head: 04fff00000000001 ffffea0000c7d301 ffffffffffffffff 0000000000000000 head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4733, tgid 4733 (udevadm), ts 25073617239, free_ts 23524753899 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1585 prep_new_page mm/page_alloc.c:1593 [inline] get_page_from_freelist+0x3ac1/0x3c60 mm/page_alloc.c:3538 __alloc_frozen_pages_noprof+0x266/0x580 mm/page_alloc.c:4806 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2446 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2610 new_slab mm/slub.c:2663 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3849 __slab_alloc+0x58/0xa0 mm/slub.c:3939 __slab_alloc_node mm/slub.c:4014 [inline] slab_alloc_node mm/slub.c:4175 [inline] kmem_cache_alloc_lru_noprof+0x274/0x390 mm/slub.c:4206 __d_alloc+0x31/0x740 fs/dcache.c:1681 d_alloc fs/dcache.c:1760 [inline] d_alloc_parallel+0xe9/0x1660 fs/dcache.c:2525 lookup_open fs/namei.c:3588 [inline] open_last_lookups fs/namei.c:3765 [inline] path_openat+0x9fb/0x35d0 fs/namei.c:4001 do_filp_open+0x284/0x4e0 fs/namei.c:4031 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x249/0x2a0 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 4708 tgid 4708 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1130 [inline] __free_frozen_pages+0xd85/0x1030 mm/page_alloc.c:2707 __slab_free+0x2c6/0x390 mm/slub.c:4544 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4138 [inline] slab_alloc_node mm/slub.c:4187 [inline] kmem_cache_alloc_noprof+0x1e1/0x390 mm/slub.c:4194 vm_area_alloc+0x24/0x1d0 kernel/fork.c:472 __mmap_new_vma mm/vma.c:2345 [inline] __mmap_region mm/vma.c:2462 [inline] mmap_region+0x1b10/0x2fc0 mm/vma.c:2540 do_mmap+0xd42/0x1420 mm/mmap.c:561 vm_mmap_pgoff+0x2a2/0x530 mm/util.c:579 ksys_mmap_pgoff+0x4ee/0x720 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888031f4d100: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888031f4d180: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb >ffff888031f4d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888031f4d280: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff888031f4d300: fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================