EXT4-fs (loop4): ext4_check_descriptors: Block bitmap for group 0 not in group (block 7)! EXT4-fs (loop4): group descriptors corrupted! loop4: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-use-after-free in diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff88803350a0c0 by task syz.4.145/6917 CPU: 1 UID: 0 PID: 6917 Comm: syz.4.145 Tainted: G W 6.17.0-rc2-syzkaller #0 PREEMPT_{RT,(full)} Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 txCommit+0x852/0x5430 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8ce/0xce0 fs/jfs/jfs_dtree.c:2674 jfs_readdir+0x1d92/0x3ae0 fs/jfs/jfs_dtree.c:3031 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x3a2/0x580 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xe4/0x260 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7c05b9ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7c03dfe038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f7c05dc5fa0 RCX: 00007f7c05b9ebe9 RDX: 0000000000000ff4 RSI: 00002000000001c0 RDI: 0000000000000006 RBP: 00007f7c05c21e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7c05dc6038 R14: 00007f7c05dc5fa0 R15: 00007ffe49f52738 Allocated by task 6776: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] kmem_cache_alloc_bulk_noprof+0x377/0x6f0 mm/slub.c:5411 mt_alloc_bulk lib/maple_tree.c:181 [inline] mas_alloc_nodes+0x447/0x8e0 lib/maple_tree.c:1277 mas_node_count_gfp lib/maple_tree.c:1337 [inline] mas_preallocate+0x3ad/0x6f0 lib/maple_tree.c:5537 vma_iter_prealloc mm/vma.h:462 [inline] __split_vma+0x2fd/0x9e0 mm/vma.c:528 split_vma mm/vma.c:598 [inline] vma_modify+0x1328/0x1880 mm/vma.c:1631 vma_modify_flags+0x1e8/0x230 mm/vma.c:1649 mprotect_fixup+0x407/0x9c0 mm/mprotect.c:816 do_mprotect_pkey+0x8cd/0xce0 mm/mprotect.c:990 __do_sys_mprotect mm/mprotect.c:1011 [inline] __se_sys_mprotect mm/mprotect.c:1008 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:1008 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 20: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x195/0x510 mm/slub.c:4782 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core kernel/rcu/tree.c:2861 [inline] rcu_cpu_kthread+0xbf3/0x1b50 kernel/rcu/tree.c:2949 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3123 [inline] call_rcu+0x157/0x9c0 kernel/rcu/tree.c:3243 ma_free_rcu lib/maple_tree.c:211 [inline] mas_topiary_node lib/maple_tree.c:2527 [inline] mas_topiary_replace lib/maple_tree.c:2628 [inline] mas_wmb_replace+0x10da/0x25f0 lib/maple_tree.c:2651 mas_split lib/maple_tree.c:3390 [inline] mas_commit_b_node+0xac5/0xf70 lib/maple_tree.c:3410 mas_wr_bnode lib/maple_tree.c:4079 [inline] mas_wr_store_entry+0x512/0x25c0 lib/maple_tree.c:4111 mas_store_prealloc+0xb03/0xf60 lib/maple_tree.c:5510 vma_iter_store_new mm/vma.h:508 [inline] vma_complete+0x224/0xae0 mm/vma.c:354 __split_vma+0x885/0x9e0 mm/vma.c:568 split_vma mm/vma.c:598 [inline] vma_modify+0x1328/0x1880 mm/vma.c:1631 vma_modify_flags+0x1e8/0x230 mm/vma.c:1649 mprotect_fixup+0x407/0x9c0 mm/mprotect.c:816 do_mprotect_pkey+0x8cd/0xce0 mm/mprotect.c:990 __do_sys_mprotect mm/mprotect.c:1011 [inline] __se_sys_mprotect mm/mprotect.c:1008 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:1008 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803350a000 which belongs to the cache maple_node of size 256 The buggy address is located 192 bytes inside of freed 256-byte region [ffff88803350a000, ffff88803350a100) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3350a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x80000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000040 ffff888019896000 ffffea0000e8ae80 dead000000000004 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0080000000000040 ffff888019896000 ffffea0000e8ae80 dead000000000004 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0080000000000001 ffffea0000cd4281 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP), pid 5897, tgid 5897 (udevd), ts 90992431920, free_ts 89056713050 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2119/0x21b0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0x8d1/0xdd0 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xe6/0x310 mm/slub.c:4236 mt_alloc_one lib/maple_tree.c:176 [inline] mas_alloc_nodes+0x2e9/0x8e0 lib/maple_tree.c:1255 mas_node_count_gfp lib/maple_tree.c:1337 [inline] mas_node_count lib/maple_tree.c:1351 [inline] mas_wr_preallocate lib/maple_tree.c:4292 [inline] mas_store_gfp+0x46c/0x860 lib/maple_tree.c:5467 vma_iter_clear_gfp include/linux/mm.h:885 [inline] do_vmi_align_munmap+0x2af/0x440 mm/vma.c:1531 do_vmi_munmap+0x253/0x2e0 mm/vma.c:1584 __vm_munmap+0x23b/0x3d0 mm/vma.c:3155 __do_sys_munmap mm/mmap.c:1080 [inline] __se_sys_munmap mm/mmap.c:1077 [inline] __x64_sys_munmap+0x60/0x70 mm/mmap.c:1077 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5897 tgid 5897 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xb59/0xce0 mm/page_alloc.c:2895 discard_slab mm/slub.c:2753 [inline] __put_partials+0x159/0x1a0 mm/slub.c:3218 __slab_free+0x2b3/0x390 mm/slub.c:4550 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x143/0x310 mm/slub.c:4236 getname_flags+0xb8/0x540 fs/namei.c:146 getname include/linux/fs.h:2918 [inline] getname_maybe_null include/linux/fs.h:2925 [inline] vfs_fstatat+0x43/0x170 fs/stat.c:370 __do_sys_newfstatat fs/stat.c:542 [inline] __se_sys_newfstatat fs/stat.c:536 [inline] __x64_sys_newfstatat+0x116/0x190 fs/stat.c:536 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888033509f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803350a000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803350a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803350a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803350a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================