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. loop0: detected capacity change from 32768 to 11 (syz.0.0,5337,0):ocfs2_expand_inline_dir:2902 ERROR: status = -12 (syz.0.0,5337,0):ocfs2_extend_dir:3186 ERROR: status = -12 (syz.0.0,5337,0):ocfs2_prepare_dir_for_insert:4291 ERROR: status = -12 (syz.0.0,5337,0):ocfs2_mknod:296 ERROR: status = -12 (syz.0.0,5337,0):ocfs2_mknod:500 ERROR: status = -12 (syz.0.0,5337,0):ocfs2_create:674 ERROR: status = -12 syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23657, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23657, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23658, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23658, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23659, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23659, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23660, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23660, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23661, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23661, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23662, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23662, async page read syz.0.0: attempt to access beyond end of device loop0: rw=0, sector=23663, nr_sectors = 1 limit=11 Buffer I/O error on dev loop0, logical block 23663, async page read ================================================================== BUG: KASAN: slab-use-after-free in ocfs2_fault+0xe9/0x3d0 fs/ocfs2/mmap.c:41 Read of size 8 at addr ffff88803f161368 by task syz.0.0/5337 CPU: 0 UID: 0 PID: 5337 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-09073-g9f16d5e6f220 #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:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 ocfs2_fault+0xe9/0x3d0 fs/ocfs2/mmap.c:41 __do_fault+0x135/0x460 mm/memory.c:4907 do_read_fault mm/memory.c:5322 [inline] do_fault mm/memory.c:5456 [inline] do_pte_missing mm/memory.c:3979 [inline] handle_pte_fault+0x335a/0x68a0 mm/memory.c:5801 __handle_mm_fault mm/memory.c:5944 [inline] handle_mm_fault+0x1106/0x1bb0 mm/memory.c:6112 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x2b9/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:fault_in_readable+0x173/0x2d0 mm/gup.c:2235 Code: 00 fc ff df 4c 89 e8 4f 8d ac 25 ff 0f 00 00 49 81 e5 00 f0 ff ff 49 39 c5 72 7a e8 f7 da b2 ff 4c 39 eb 74 7d 4c 89 64 24 08 <44> 8a 23 43 0f b6 04 3e 84 c0 75 18 44 88 64 24 40 48 81 c3 00 10 RSP: 0018:ffffc9000d3b77c0 EFLAGS: 00050287 RAX: ffffffff81e30519 RBX: 0000000020001000 RCX: 0000000000100000 RDX: ffffc9000e532000 RSI: 00000000000008f7 RDI: 00000000000008f8 RBP: ffffc9000d3b7878 R08: ffffffff81e304ac R09: ffffffff84b345d9 R10: 0000000000000002 R11: ffff888000b6c880 R12: 0000000000001000 R13: 0000000020002000 R14: 1ffff92001a76f00 R15: dffffc0000000000 fault_in_iov_iter_readable+0x229/0x280 lib/iov_iter.c:94 generic_perform_write+0x259/0x6d0 mm/filemap.c:4045 ocfs2_file_write_iter+0x17b1/0x1f50 fs/ocfs2/file.c:2467 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 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:0x7f2cd557e819 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:00007f2cd6436038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f2cd5735fa0 RCX: 00007f2cd557e819 RDX: 000000000000fea7 RSI: 0000000020000000 RDI: 0000000000000009 RBP: 00007f2cd55f175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2cd5735fa0 R15: 00007ffe93518018 Allocated by task 5337: 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:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4141 vm_area_alloc+0x24/0x1d0 kernel/fork.c:472 __mmap_new_vma mm/vma.c:2340 [inline] __mmap_region+0x196e/0x2cd0 mm/vma.c:2456 mmap_region+0x1d0/0x2c0 mm/mmap.c:1347 do_mmap+0x8f0/0x1000 mm/mmap.c:496 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 ksys_mmap_pgoff+0x4eb/0x720 mm/mmap.c:542 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 Freed by task 5338: 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:579 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:2342 [inline] slab_free mm/slub.c:4579 [inline] kmem_cache_free+0x1a2/0x420 mm/slub.c:4681 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:655 irq_exit_rcu+0x9/0x30 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x57/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3086 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3190 remove_vma mm/vma.c:387 [inline] vms_complete_munmap_vmas+0x65b/0x8f0 mm/vma.c:1201 __mmap_complete mm/vma.c:2406 [inline] __mmap_region+0x17e3/0x2cd0 mm/vma.c:2469 mmap_region+0x1d0/0x2c0 mm/mmap.c:1347 do_mmap+0x8f0/0x1000 mm/mmap.c:496 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 ksys_mmap_pgoff+0x4eb/0x720 mm/mmap.c:542 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 ffff88803f1612e8 which belongs to the cache vm_area_struct of size 184 The buggy address is located 128 bytes inside of freed 184-byte region [ffff88803f1612e8, ffff88803f1613a0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3f161 anon flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801be90b40 0000000000000000 0000000000000001 raw: 0000000000000000 0000000080100010 00000001f5000000 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 5314, tgid 5314 (sshd), ts 57129121022, free_ts 56485346016 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x140 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4141 vm_area_dup+0x27/0x290 kernel/fork.c:487 dup_mmap kernel/fork.c:691 [inline] dup_mm kernel/fork.c:1675 [inline] copy_mm+0xb61/0x1e80 kernel/fork.c:1724 copy_process+0x1845/0x3d50 kernel/fork.c:2375 kernel_clone+0x226/0x8f0 kernel/fork.c:2787 __do_sys_clone kernel/fork.c:2930 [inline] __se_sys_clone kernel/fork.c:2914 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2914 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 page last free pid 5313 tgid 5313 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf37/0x1a20 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x2ea/0x690 mm/swap_state.c:332 __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+0x496/0xc40 mm/mmap.c:1680 __mmput+0x115/0x390 kernel/fork.c:1347 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 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: ffff88803f161200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803f161280: 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb >ffff88803f161300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803f161380: fb fb fb fb fc fc fc fc fc fc fc fc 00 00 00 00 ffff88803f161400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 3 bytes skipped: 0: df 4c 89 e8 fisttps -0x18(%rcx,%rcx,4) 4: 4f 8d ac 25 ff 0f 00 lea 0xfff(%r13,%r12,1),%r13 b: 00 c: 49 81 e5 00 f0 ff ff and $0xfffffffffffff000,%r13 13: 49 39 c5 cmp %rax,%r13 16: 72 7a jb 0x92 18: e8 f7 da b2 ff call 0xffb2db14 1d: 4c 39 eb cmp %r13,%rbx 20: 74 7d je 0x9f 22: 4c 89 64 24 08 mov %r12,0x8(%rsp) * 27: 44 8a 23 mov (%rbx),%r12b <-- trapping instruction 2a: 43 0f b6 04 3e movzbl (%r14,%r15,1),%eax 2f: 84 c0 test %al,%al 31: 75 18 jne 0x4b 33: 44 88 64 24 40 mov %r12b,0x40(%rsp) 38: 48 rex.W 39: 81 .byte 0x81 3a: c3 ret 3b: 00 10 add %dl,(%rax)