loop0: detected capacity change from 0 to 32768 bcachefs (da441363-bb6a-4ab9-999b-c1f40db4fee2): Using encoding defined by superblock: utf8-12.1.0 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,metadata_checksum=none,data_checksum=none,compression=lz4,foreground_target=invalid label 3838,background_target=invalid label 3838,promote_target=invalid label 3823,nojournal_transaction_names allowing incompatible features above 0.0: (unknown version) bcachefs (loop0): invalid journal entry, version=1.7: mi_btree_bitmap type=blacklist_v2 in superblock: invalid journal seq blacklist entry: bad size, fixing bcachefs (loop0): recovering from clean shutdown, journal seq 10 bcachefs (loop0): Version upgrade required: Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.24: unwritten_extents to 1.25: extent_flags running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_unreachable_inodes,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance ================================================================== BUG: KASAN: slab-out-of-bounds in bch2_btree_node_read_done+0xd31/0x5470 fs/bcachefs/btree_io.c:1085 Read of size 8 at addr ffff888043a13e10 by task syz.0.0/5312 CPU: 0 UID: 0 PID: 5312 Comm: syz.0.0 Not tainted 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 bch2_btree_node_read_done+0xd31/0x5470 fs/bcachefs/btree_io.c:1085 btree_node_read_work+0x565/0xef0 fs/bcachefs/btree_io.c:1366 bch2_btree_node_read+0x2151/0x27a0 fs/bcachefs/btree_io.c:-1 __bch2_btree_root_read fs/bcachefs/btree_io.c:1797 [inline] bch2_btree_root_read+0x5e7/0x750 fs/bcachefs/btree_io.c:1819 read_btree_roots+0x2cb/0x800 fs/bcachefs/recovery.c:582 bch2_fs_recovery+0x2356/0x37b0 fs/bcachefs/recovery.c:929 bch2_fs_start+0x70b/0xae0 fs/bcachefs/super.c:1091 bch2_fs_get_tree+0xd99/0x13a0 fs/bcachefs/fs.c:2570 vfs_get_tree+0x8f/0x2b0 fs/super.c:1759 do_new_mount+0x24a/0xa40 fs/namespace.c:3884 do_mount fs/namespace.c:4224 [inline] __do_sys_mount fs/namespace.c:4435 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4412 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f98a019010a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f98a0f46e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f98a0f46ef0 RCX: 00007f98a019010a RDX: 00002000000000c0 RSI: 0000200000000180 RDI: 00007f98a0f46eb0 RBP: 00002000000000c0 R08: 00007f98a0f46ef0 R09: 0000000003000000 R10: 0000000003000000 R11: 0000000000000246 R12: 0000200000000180 R13: 00007f98a0f46eb0 R14: 00000000000059d1 R15: 00002000000002c0 Allocated by task 5312: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kvmalloc_node_noprof+0x314/0x5e0 mm/slub.c:5012 btree_node_data_alloc+0xd5/0x260 fs/bcachefs/btree_cache.c:156 __bch2_btree_node_mem_alloc+0x1ed/0x410 fs/bcachefs/btree_cache.c:201 bch2_fs_btree_cache_init+0x2c9/0x680 fs/bcachefs/btree_cache.c:656 bch2_fs_alloc fs/bcachefs/super.c:909 [inline] bch2_fs_open+0x235e/0x2820 fs/bcachefs/super.c:2205 bch2_fs_get_tree+0x45d/0x13a0 fs/bcachefs/fs.c:2489 vfs_get_tree+0x8f/0x2b0 fs/super.c:1759 do_new_mount+0x24a/0xa40 fs/namespace.c:3884 do_mount fs/namespace.c:4224 [inline] __do_sys_mount fs/namespace.c:4435 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4412 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888043a13c00 which belongs to the cache kmalloc-rcl-512 of size 512 The buggy address is located 16 bytes to the right of allocated 512-byte region [ffff888043a13c00, ffff888043a13e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x43a12 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88803a174881 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88801a042dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080080008 00000000f5000000 ffff88803a174881 head: 04fff00000000040 ffff88801a042dc0 dead000000000122 0000000000000000 head: 0000000000000000 0000000080080008 00000000f5000000 ffff88803a174881 head: 04fff00000000001 ffffea00010e8481 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 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 5312, tgid 5311 (syz.0.0), ts 75726396321, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kvmalloc_node_noprof+0x411/0x5e0 mm/slub.c:5012 btree_node_data_alloc+0xd5/0x260 fs/bcachefs/btree_cache.c:156 __bch2_btree_node_mem_alloc+0x1ed/0x410 fs/bcachefs/btree_cache.c:201 bch2_fs_btree_cache_init+0x2c9/0x680 fs/bcachefs/btree_cache.c:656 bch2_fs_alloc fs/bcachefs/super.c:909 [inline] bch2_fs_open+0x235e/0x2820 fs/bcachefs/super.c:2205 bch2_fs_get_tree+0x45d/0x13a0 fs/bcachefs/fs.c:2489 vfs_get_tree+0x8f/0x2b0 fs/super.c:1759 do_new_mount+0x24a/0xa40 fs/namespace.c:3884 do_mount fs/namespace.c:4224 [inline] __do_sys_mount fs/namespace.c:4435 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4412 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 page_owner free stack trace missing Memory state around the buggy address: ffff888043a13d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888043a13d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888043a13e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888043a13e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043a13f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================