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 16383 syz.0.0: attempt to access beyond end of device loop0: rw=8427521, sector=17056, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 17056, lost sync page write Aborting journal on device loop0-75. (syz.0.0,5337,0):__ocfs2_flush_truncate_log:6041 ERROR: status = -5 (syz.0.0,5337,0):ocfs2_sync_fs:408 ERROR: status = -5 syz.0.0: attempt to access beyond end of device loop0: rw=524288, sector=19232, nr_sectors = 40 limit=16383 syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19232, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19232, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19233, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19233, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19234, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19234, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19235, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19235, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19236, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19236, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19237, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19237, async page read syz.0.0: attempt to access beyond end of device loop0: rw=8388608, sector=19238, nr_sectors = 1 limit=16383 Buffer I/O error on dev loop0, logical block 19238, async page read Buffer I/O error on dev loop0, logical block 19239, async page read ================================================================== BUG: KASAN: slab-use-after-free in ocfs2_fault+0xd3/0x3e0 fs/ocfs2/mmap.c:41 Read of size 8 at addr ffff888011a6f558 by task syz.0.0/5337 CPU: 0 UID: 0 PID: 5337 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_fault+0xd3/0x3e0 fs/ocfs2/mmap.c:41 __do_fault+0x138/0x390 mm/memory.c:5320 do_read_fault mm/memory.c:5755 [inline] do_fault mm/memory.c:5889 [inline] do_pte_missing+0x2206/0x3330 mm/memory.c:4401 handle_pte_fault mm/memory.c:6273 [inline] __handle_mm_fault mm/memory.c:6411 [inline] handle_mm_fault+0x1b26/0x32b0 mm/memory.c:6580 do_user_addr_fault+0x764/0x1380 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x82/0x100 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 RIP: 0010:do_strncpy_from_user lib/strncpy_from_user.c:41 [inline] RIP: 0010:strncpy_from_user+0xb7/0x2c0 lib/strncpy_from_user.c:130 Code: 00 00 4c 89 f6 e8 89 c1 f8 fc 49 83 fe 07 0f 86 9d 00 00 00 48 89 1c 24 4c 89 74 24 08 48 c7 c5 f8 ff ff ff 45 31 ff 4c 89 e3 <4f> 8b 34 3c 48 b8 ff fe fe fe fe fe fe fe 4d 8d 24 06 4d 89 f5 49 RSP: 0018:ffffc9000d36fd10 EFLAGS: 00050246 RAX: ffffffff84c90547 RBX: 0000200000000180 RCX: ffff88801c7d8000 RDX: 0000000000000002 RSI: 0000000000000fe0 RDI: 0000000000000007 RBP: fffffffffffffff8 R08: ffff8880118c53ff R09: 1ffff11002318a7f R10: dffffc0000000000 R11: ffffed1002318a80 R12: 0000200000000180 R13: dffffc0000000000 R14: 0000000000000fe0 R15: 0000000000000000 getname_flags+0xf3/0x540 fs/namei.c:157 getname include/linux/fs.h:2498 [inline] do_sys_openat2+0xbc/0x200 fs/open.c:1426 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1447 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f46e598f7c9 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:00007f46e1df5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f46e5be5fa0 RCX: 00007f46e598f7c9 RDX: 000000000000275a RSI: 0000200000000180 RDI: ffffffffffffff9c RBP: 00007f46e5a13f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f46e5be6038 R14: 00007f46e5be5fa0 R15: 00007fff3cb43d88 Allocated by task 5337: 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:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x37d/0x710 mm/slub.c:5270 vm_area_alloc+0x24/0x140 mm/vma_init.c:32 __mmap_new_vma mm/vma.c:2469 [inline] __mmap_region mm/vma.c:2708 [inline] mmap_region+0xdea/0x1d10 mm/vma.c:2786 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:581 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5341: 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:584 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:2540 [inline] slab_free_after_rcu_debug+0x125/0x260 mm/slub.c:6727 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 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:556 slab_free_hook mm/slub.c:2501 [inline] slab_free mm/slub.c:6668 [inline] kmem_cache_free+0x475/0x620 mm/slub.c:6779 remove_vma mm/vma.c:462 [inline] vms_complete_munmap_vmas+0x626/0x8a0 mm/vma.c:1296 __mmap_complete+0x7b/0x610 mm/vma.c:2540 __mmap_region mm/vma.c:2717 [inline] mmap_region+0x190d/0x1d10 mm/vma.c:2786 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:581 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888011a6f500 which belongs to the cache vm_area_struct of size 256 The buggy address is located 88 bytes inside of freed 256-byte region [ffff888011a6f500, ffff888011a6f600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a6f memcg:ffff8880129a0c01 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b6d2b40 ffffea000049f1c0 dead000000000005 raw: 0000000000000000 00000000000c000c 00000000f5000000 ffff8880129a0c01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5029, tgid 5029 (dhcpcd), ts 55442623402, free_ts 55199081415 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4656 __kmem_cache_alloc_bulk+0x1d9/0x550 mm/slub.c:7429 refill_sheaf mm/slub.c:2650 [inline] __pcs_replace_empty_main+0x298/0x560 mm/slub.c:5023 alloc_from_pcs mm/slub.c:5121 [inline] slab_alloc_node mm/slub.c:5248 [inline] kmem_cache_alloc_noprof+0x469/0x710 mm/slub.c:5270 vm_area_dup+0x2b/0x680 mm/vma_init.c:123 dup_mmap+0x870/0x1b80 mm/mmap.c:1773 dup_mm kernel/fork.c:1529 [inline] copy_mm+0x13c/0x4b0 kernel/fork.c:1581 copy_process+0x165d/0x3950 kernel/fork.c:2221 kernel_clone+0x21e/0x820 kernel/fork.c:2651 __do_sys_clone kernel/fork.c:2792 [inline] __se_sys_clone kernel/fork.c:2776 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2776 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 page last free pid 0 tgid 0 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Memory state around the buggy address: ffff888011a6f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011a6f480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888011a6f500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011a6f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011a6f600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 4c 89 f6 mov %r14,%rsi 5: e8 89 c1 f8 fc call 0xfcf8c193 a: 49 83 fe 07 cmp $0x7,%r14 e: 0f 86 9d 00 00 00 jbe 0xb1 14: 48 89 1c 24 mov %rbx,(%rsp) 18: 4c 89 74 24 08 mov %r14,0x8(%rsp) 1d: 48 c7 c5 f8 ff ff ff mov $0xfffffffffffffff8,%rbp 24: 45 31 ff xor %r15d,%r15d 27: 4c 89 e3 mov %r12,%rbx * 2a: 4f 8b 34 3c mov (%r12,%r15,1),%r14 <-- trapping instruction 2e: 48 b8 ff fe fe fe fe movabs $0xfefefefefefefeff,%rax 35: fe fe fe 38: 4d 8d 24 06 lea (%r14,%rax,1),%r12 3c: 4d 89 f5 mov %r14,%r13 3f: 49 rex.WB