================================================================== BUG: KASAN: slab-use-after-free in ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1391 [inline] BUG: KASAN: slab-use-after-free in ocfs2_claim_suballoc_bits+0xeb0/0x2230 fs/ocfs2/suballoc.c:1927 Read of size 4 at addr ffff88802a9ad000 by task syz.2.3/5874 CPU: 0 PID: 5874 Comm: syz.2.3 Not tainted 6.6.101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x220 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1391 [inline] ocfs2_claim_suballoc_bits+0xeb0/0x2230 fs/ocfs2/suballoc.c:1927 ocfs2_claim_new_inode+0x32a/0x780 fs/ocfs2/suballoc.c:2210 ocfs2_mknod_locked+0x101/0x250 fs/ocfs2/namei.c:635 ocfs2_mknod+0x107e/0x20f0 fs/ocfs2/namei.c:381 ocfs2_create+0x196/0x410 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3488 [inline] open_last_lookups fs/namei.c:3556 [inline] path_openat+0x1277/0x3190 fs/namei.c:3786 do_filp_open+0x1c5/0x3d0 fs/namei.c:3816 do_sys_openat2+0x12c/0x1c0 fs/open.c:1419 do_sys_open fs/open.c:1434 [inline] __do_sys_creat fs/open.c:1512 [inline] __se_sys_creat fs/open.c:1506 [inline] __x64_sys_creat+0x90/0xb0 fs/open.c:1506 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f986b78eb69 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:00007f986c62d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f986b9b5fa0 RCX: 00007f986b78eb69 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000d80 RBP: 00007f986b811df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f986b9b5fa0 R15: 00007ffc979d4208 Allocated by task 12: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3493 [inline] __kmem_cache_alloc_lru mm/slub.c:3500 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3509 alloc_pid+0xa1/0xc20 kernel/pid.c:183 copy_process+0x1967/0x3d70 kernel/fork.c:2522 kernel_clone+0x21b/0x840 kernel/fork.c:2914 user_mode_thread+0xde/0x130 kernel/fork.c:2992 call_usermodehelper_exec_work+0x5c/0x220 kernel/umh.c:172 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2721 [inline] call_rcu+0x158/0x930 kernel/rcu/tree.c:2837 __unhash_process kernel/exit.c:128 [inline] __exit_signal kernel/exit.c:199 [inline] release_task+0xc9c/0x1610 kernel/exit.c:256 exit_notify kernel/exit.c:767 [inline] do_exit+0x17ae/0x23c0 kernel/exit.c:895 call_usermodehelper_exec_async+0x348/0x350 kernel/umh.c:123 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff88802a9ad000 which belongs to the cache pid of size 224 The buggy address is located 0 bytes inside of freed 224-byte region [ffff88802a9ad000, ffff88802a9ad0e0) The buggy address belongs to the physical page: page:ffffea0000aa6b40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802a9addc0 pfn:0x2a9ad flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888019a4c000 ffffea0000aa6650 ffffea0000aca390 raw: ffff88802a9addc0 00000000000c0003 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 12, tgid 12 (kworker/u4:1), ts 11156051032, free_ts 11154489244 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1876 allocate_slab mm/slub.c:2023 [inline] new_slab+0x87/0x2e0 mm/slub.c:2076 ___slab_alloc+0xc6d/0x12f0 mm/slub.c:3230 __slab_alloc mm/slub.c:3329 [inline] __slab_alloc_node mm/slub.c:3382 [inline] slab_alloc_node mm/slub.c:3475 [inline] slab_alloc mm/slub.c:3493 [inline] __kmem_cache_alloc_lru mm/slub.c:3500 [inline] kmem_cache_alloc+0x1b7/0x2e0 mm/slub.c:3509 alloc_pid+0xa1/0xc20 kernel/pid.c:183 copy_process+0x1967/0x3d70 kernel/fork.c:2522 kernel_clone+0x21b/0x840 kernel/fork.c:2914 user_mode_thread+0xde/0x130 kernel/fork.c:2992 call_usermodehelper_exec_work+0x5c/0x220 kernel/umh.c:172 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 mm_free_pgd kernel/fork.c:809 [inline] __mmdrop+0xb4/0x3d0 kernel/fork.c:925 free_bprm+0x171/0x3e0 fs/exec.c:1514 kernel_execve+0x3c2/0x9c0 fs/exec.c:2060 call_usermodehelper_exec_async+0x20b/0x350 kernel/umh.c:110 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Memory state around the buggy address: ffff88802a9acf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802a9acf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802a9ad000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802a9ad080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88802a9ad100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================