================================================================== BUG: KASAN: slab-out-of-bounds in ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1445 [inline] BUG: KASAN: slab-out-of-bounds in ocfs2_claim_suballoc_bits+0x10d3/0x2570 fs/ocfs2/suballoc.c:1982 Read of size 4 at addr ffff888011a6a0c0 by task syz.0.0/5114 CPU: 0 UID: 0 PID: 5114 Comm: syz.0.0 Not tainted 6.11.0-rc7-syzkaller-00133-ge936e7d4a83b #0 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:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1445 [inline] ocfs2_claim_suballoc_bits+0x10d3/0x2570 fs/ocfs2/suballoc.c:1982 ocfs2_claim_metadata+0x16d/0x580 fs/ocfs2/suballoc.c:2057 ocfs2_create_refcount_tree+0x699/0x15f0 fs/ocfs2/refcounttree.c:590 ocfs2_reflink_remap_blocks+0x2f6/0x1f30 fs/ocfs2/refcounttree.c:4634 ocfs2_remap_file_range+0x600/0x8e0 fs/ocfs2/file.c:2724 vfs_copy_file_range+0xc1f/0x1530 fs/read_write.c:1522 __do_sys_copy_file_range fs/read_write.c:1612 [inline] __se_sys_copy_file_range+0x3f2/0x5d0 fs/read_write.c:1575 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1df1b7def9 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:00007f1df2a0c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007f1df1d36058 RCX: 00007f1df1b7def9 RDX: 000000000000000c RSI: 00000000200001c0 RDI: 000000000000000d RBP: 00007f1df1bf0b76 R08: ffffffffa003e45c R09: 0700000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1df1d36058 R15: 00007fff293c08b8 Allocated by task 4586: 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:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3992 [inline] slab_alloc_node mm/slub.c:4041 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4048 vm_area_dup+0x27/0x290 kernel/fork.c:486 __split_vma+0x1a9/0xc30 mm/mmap.c:2465 do_vmi_align_munmap+0x388/0x18c0 mm/mmap.c:2663 do_vmi_munmap+0x261/0x2f0 mm/mmap.c:2830 mmap_region+0x72f/0x2090 mm/mmap.c:2881 do_mmap+0x8f9/0x1010 mm/mmap.c:1468 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1514 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888011a6a000 which belongs to the cache vm_area_struct of size 184 The buggy address is located 8 bytes to the right of allocated 184-byte region [ffff888011a6a000, ffff888011a6a0b8) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888011a6aaa8 pfn:0x11a6a flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000200 ffff88801be90b40 ffffea0000786c10 ffffea0000791990 raw: ffff888011a6aaa8 000000000010000a 00000001fdffffff 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4586, tgid 4586 (klogd), ts 31247182214, free_ts 31242023712 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2325 allocate_slab+0x5a/0x2f0 mm/slub.c:2488 new_slab mm/slub.c:2541 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3727 __slab_alloc+0x58/0xa0 mm/slub.c:3817 __slab_alloc_node mm/slub.c:3870 [inline] slab_alloc_node mm/slub.c:4029 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4048 vm_area_dup+0x27/0x290 kernel/fork.c:486 __split_vma+0x1a9/0xc30 mm/mmap.c:2465 do_vmi_align_munmap+0x388/0x18c0 mm/mmap.c:2663 do_vmi_munmap+0x261/0x2f0 mm/mmap.c:2830 mmap_region+0x72f/0x2090 mm/mmap.c:2881 do_mmap+0x8f9/0x1010 mm/mmap.c:1468 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1514 page last free pid 4584 tgid 4584 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2667 folios_put_refs+0x76e/0x860 mm/swap.c:1039 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3425 __mmput+0x115/0x390 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x27f0 kernel/exit.c:869 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 __do_sys_exit_group kernel/exit.c:1042 [inline] __se_sys_exit_group kernel/exit.c:1040 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888011a69f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888011a6a000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888011a6a080: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa ^ ffff888011a6a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011a6a180: fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00 00 ==================================================================