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. ======================================================= ocfs2: Mounting device (7,0) on (node local, slot 0) with writeback data mode. ================================================================== BUG: KASAN: slab-use-after-free in ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1447 [inline] BUG: KASAN: slab-use-after-free in ocfs2_claim_suballoc_bits+0x8b2/0x2450 fs/ocfs2/suballoc.c:1996 Read of size 4 at addr ffff888043757000 by task syz.0.0/5330 CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #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:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1447 [inline] ocfs2_claim_suballoc_bits+0x8b2/0x2450 fs/ocfs2/suballoc.c:1996 ocfs2_claim_new_inode+0x332/0x7a0 fs/ocfs2/suballoc.c:2292 ocfs2_mknod_locked+0x100/0x250 fs/ocfs2/namei.c:637 ocfs2_mknod+0x10c7/0x2050 fs/ocfs2/namei.c:384 ocfs2_create+0x1a5/0x440 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3796 [inline] open_last_lookups fs/namei.c:3895 [inline] path_openat+0x14f1/0x3830 fs/namei.c:4131 do_filp_open+0x1fa/0x410 fs/namei.c:4161 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_open fs/open.c:1460 [inline] __se_sys_open fs/open.c:1456 [inline] __x64_sys_open+0x11e/0x150 fs/open.c:1456 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:0x7f492e98eec9 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:00007f492f813038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f492ebe5fa0 RCX: 00007f492e98eec9 RDX: 0000000000000000 RSI: 0000000000145142 RDI: 0000200000000240 RBP: 00007f492ea11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f492ebe6038 R14: 00007f492ebe5fa0 R15: 00007ffdbd15a438 Allocated by task 5302: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:342 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] kmem_cache_alloc_from_sheaf_noprof+0x9c/0x160 mm/slub.c:5516 mas_pop_node lib/maple_tree.c:1084 [inline] mas_new_ma_node lib/maple_tree.c:2138 [inline] mas_split_final_node+0x1a9/0x580 lib/maple_tree.c:2814 mas_push_data+0x97d/0xcd0 lib/maple_tree.c:2961 mas_split lib/maple_tree.c:3025 [inline] mas_commit_b_node+0x919/0x1090 lib/maple_tree.c:3070 mas_wr_bnode lib/maple_tree.c:3737 [inline] mas_wr_store_entry+0x51d/0x2790 lib/maple_tree.c:3769 mas_store_prealloc+0xaf2/0x1030 lib/maple_tree.c:5167 vma_iter_store_new mm/vma.h:488 [inline] vma_complete+0x224/0xae0 mm/vma.c:354 __split_vma+0x8a6/0xa00 mm/vma.c:568 vms_gather_munmap_vmas+0x4c6/0x12e0 mm/vma.c:1380 __mmap_prepare mm/vma.c:2359 [inline] __mmap_region mm/vma.c:2652 [inline] mmap_region+0x722/0x2110 mm/vma.c:2740 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 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 1047: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2514 [inline] slab_free_freelist_hook mm/slub.c:2543 [inline] slab_free_bulk mm/slub.c:6598 [inline] kmem_cache_free_bulk+0xb2c/0xdd0 mm/slub.c:7282 kfree_bulk include/linux/slab.h:830 [inline] kvfree_rcu_bulk+0xe5/0x1f0 mm/slab_common.c:1522 kvfree_rcu_drain_ready mm/slab_common.c:1729 [inline] kfree_rcu_monitor+0x211/0x2a0 mm/slab_common.c:1802 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x439/0x7d0 arch/x86/kernel/process.c:158 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:56 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:559 kvfree_call_rcu+0x130/0x4c0 mm/slab_common.c:1995 ma_free_rcu lib/maple_tree.c:206 [inline] mas_topiary_node lib/maple_tree.c:2309 [inline] mas_topiary_replace lib/maple_tree.c:2408 [inline] mas_wmb_replace+0x10d8/0x1820 lib/maple_tree.c:2431 mas_split lib/maple_tree.c:3050 [inline] mas_commit_b_node+0xbf7/0x1090 lib/maple_tree.c:3070 mas_wr_bnode lib/maple_tree.c:3737 [inline] mas_wr_store_entry+0x51d/0x2790 lib/maple_tree.c:3769 mas_store_prealloc+0xaf2/0x1030 lib/maple_tree.c:5167 vma_iter_store_new mm/vma.h:488 [inline] vma_complete+0x224/0xae0 mm/vma.c:354 __split_vma+0x8a6/0xa00 mm/vma.c:568 vms_gather_munmap_vmas+0x2e2/0x12e0 mm/vma.c:1359 __mmap_prepare mm/vma.c:2359 [inline] __mmap_region mm/vma.c:2652 [inline] mmap_region+0x722/0x2110 mm/vma.c:2740 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 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 ffff888043757000 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff888043757000, ffff888043757100) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888043757800 pfn:0x43757 flags: 0x4fff00000000200(workingset|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000200 ffff88801a04bc80 ffffea00010d6610 ffffea0001085f10 raw: ffff888043757800 0000000000080002 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 5302, tgid 5302 (sshd-session), ts 60690999000, free_ts 55475636448 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3030 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3203 new_slab mm/slub.c:3257 [inline] ___slab_alloc+0xe94/0x1920 mm/slub.c:4627 __kmem_cache_alloc_bulk+0x1e2/0x590 mm/slub.c:7330 refill_sheaf mm/slub.c:2608 [inline] kmem_cache_prefill_sheaf+0x28a/0x440 mm/slub.c:5372 mt_get_sheaf lib/maple_tree.c:187 [inline] mas_alloc_nodes+0x1c2/0x350 lib/maple_tree.c:1138 mas_preallocate+0x2e0/0x670 lib/maple_tree.c:5192 vma_iter_prealloc mm/vma.h:442 [inline] __split_vma+0x2fa/0xa00 mm/vma.c:528 vms_gather_munmap_vmas+0x4c6/0x12e0 mm/vma.c:1380 __mmap_prepare mm/vma.c:2359 [inline] __mmap_region mm/vma.c:2652 [inline] mmap_region+0x722/0x2110 mm/vma.c:2740 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 page last free pid 5278 tgid 5278 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906 __slab_free+0x2e7/0x390 mm/slub.c:5923 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:352 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] slab_alloc_node mm/slub.c:5245 [inline] __do_kmalloc_node mm/slub.c:5602 [inline] __kmalloc_noprof+0x3c3/0x7f0 mm/slub.c:5615 kmalloc_noprof include/linux/slab.h:961 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x213/0x4b0 security/tomoyo/file.c:822 security_inode_getattr+0x12f/0x330 security/security.c:2416 vfs_getattr fs/stat.c:259 [inline] vfs_fstat fs/stat.c:281 [inline] __do_sys_newfstat fs/stat.c:555 [inline] __se_sys_newfstat fs/stat.c:550 [inline] __x64_sys_newfstat+0xfc/0x200 fs/stat.c:550 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: ffff888043756f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888043756f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888043757000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888043757080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888043757100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================