loop0: detected capacity change from 0 to 32768 ======================================================= 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. ======================================================= JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. ================================================================== BUG: KASAN: slab-use-after-free in ocfs2_find_smallest_chain fs/ocfs2/suballoc.c:413 [inline] BUG: KASAN: slab-use-after-free in ocfs2_block_group_alloc_contig fs/ocfs2/suballoc.c:430 [inline] BUG: KASAN: slab-use-after-free in ocfs2_block_group_alloc fs/ocfs2/suballoc.c:699 [inline] BUG: KASAN: slab-use-after-free in ocfs2_reserve_suballoc_bits+0x10b8/0x4f30 fs/ocfs2/suballoc.c:832 Read of size 4 at addr ffff888042ba3004 by task syz.0.0/5328 CPU: 0 UID: 0 PID: 5328 Comm: syz.0.0 Not tainted 6.15.0-rc1-syzkaller-00288-ge618ee89561b #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 ocfs2_find_smallest_chain fs/ocfs2/suballoc.c:413 [inline] ocfs2_block_group_alloc_contig fs/ocfs2/suballoc.c:430 [inline] ocfs2_block_group_alloc fs/ocfs2/suballoc.c:699 [inline] ocfs2_reserve_suballoc_bits+0x10b8/0x4f30 fs/ocfs2/suballoc.c:832 ocfs2_reserve_new_metadata_blocks+0x41c/0x9b0 fs/ocfs2/suballoc.c:982 ocfs2_init_xattr_set_ctxt+0x3bb/0x900 fs/ocfs2/xattr.c:3277 ocfs2_xattr_set+0xf52/0x1940 fs/ocfs2/xattr.c:3634 __vfs_setxattr+0x468/0x4a0 fs/xattr.c:200 __vfs_setxattr_noperm+0x12e/0x660 fs/xattr.c:234 vfs_setxattr+0x223/0x430 fs/xattr.c:321 ovl_do_setxattr fs/overlayfs/overlayfs.h:315 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:327 [inline] ovl_make_workdir fs/overlayfs/super.c:715 [inline] ovl_get_workdir+0xea3/0x19e0 fs/overlayfs/super.c:827 ovl_fill_super+0x1386/0x3720 fs/overlayfs/super.c:1401 vfs_get_super fs/super.c:1280 [inline] get_tree_nodev+0xb7/0x140 fs/super.c:1299 vfs_get_tree+0x90/0x2b0 fs/super.c:1759 do_new_mount+0x2cf/0xb70 fs/namespace.c:3879 do_mount fs/namespace.c:4219 [inline] __do_sys_mount fs/namespace.c:4430 [inline] __se_sys_mount+0x38c/0x400 fs/namespace.c:4407 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 RIP: 0033:0x7f6ef498d169 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:00007f6ef572e038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f6ef4ba5fa0 RCX: 00007f6ef498d169 RDX: 0000200000000080 RSI: 00002000000000c0 RDI: 0000000000000000 RBP: 00007f6ef4a0e990 R08: 0000200000000400 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6ef4ba5fa0 R15: 00007ffdc653e018 Allocated by task 5292: 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:4151 [inline] slab_alloc_node mm/slub.c:4200 [inline] kmem_cache_alloc_noprof+0x1e1/0x390 mm/slub.c:4207 lsm_file_alloc security/security.c:733 [inline] security_file_alloc+0x32/0x310 security/security.c:2858 init_file+0x90/0x300 fs/file_table.c:156 alloc_empty_file+0x70/0x1d0 fs/file_table.c:238 path_openat+0x10d/0x35d0 fs/namei.c:3990 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 Freed by task 5292: 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:2389 [inline] slab_free mm/slub.c:4646 [inline] kmem_cache_free+0x197/0x410 mm/slub.c:4748 file_free+0x24/0x200 fs/file_table.c:68 fput_close+0x1f2/0x270 fs/file_table.c:582 path_openat+0x2f18/0x35d0 fs/namei.c:4013 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 The buggy address belongs to the object at ffff888042ba3000 which belongs to the cache lsm_file_cache of size 96 The buggy address is located 4 bytes inside of freed 96-byte region [ffff888042ba3000, ffff888042ba3060) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888042ba3480 pfn:0x42ba3 flags: 0x4fff00000000200(workingset|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000200 ffff88801c2a2140 ffffea000101a5d0 ffffea00010dca10 raw: ffff888042ba3480 0000000000200001 00000000f5000000 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 5260, tgid 5260 (rm), ts 60086534543, free_ts 60046183414 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x352b/0x36c0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4934 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2623 new_slab mm/slub.c:2676 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3862 __slab_alloc+0x58/0xa0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] kmem_cache_alloc_noprof+0x270/0x390 mm/slub.c:4207 lsm_file_alloc security/security.c:733 [inline] security_file_alloc+0x32/0x310 security/security.c:2858 init_file+0x90/0x300 fs/file_table.c:156 alloc_empty_file+0x70/0x1d0 fs/file_table.c:238 path_openat+0x10d/0x35d0 fs/namei.c:3990 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 page last free pid 5257 tgid 5257 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xde8/0x10a0 mm/page_alloc.c:2680 tlb_batch_list_free mm/mmu_gather.c:159 [inline] tlb_finish_mmu+0x11f/0x200 mm/mmu_gather.c:499 exit_mmap+0x5b1/0xde0 mm/mmap.c:1297 __mmput+0x115/0x420 kernel/fork.c:1379 exit_mm+0x221/0x310 kernel/exit.c:589 do_exit+0x994/0x27f0 kernel/exit.c:940 do_group_exit+0x207/0x2c0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1111 x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232 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: ffff888042ba2f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888042ba2f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888042ba3000: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888042ba3080: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888042ba3100: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================