================================================================== BUG: KASAN: slab-use-after-free in f2fs_filemap_fault+0x145/0x2d0 fs/f2fs/file.c:49 Read of size 8 at addr ffff88802ded3240 by task syz-executor419/9950 CPU: 0 PID: 9950 Comm: syz-executor419 Not tainted 6.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x214/0x300 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x163/0x540 mm/kasan/report.c:488 kasan_report+0x142/0x170 mm/kasan/report.c:601 f2fs_filemap_fault+0x145/0x2d0 fs/f2fs/file.c:49 __do_fault+0x131/0x450 mm/memory.c:4376 do_shared_fault mm/memory.c:4798 [inline] do_fault mm/memory.c:4872 [inline] do_pte_missing+0x786/0x3a40 mm/memory.c:3745 handle_pte_fault mm/memory.c:5144 [inline] __handle_mm_fault mm/memory.c:5285 [inline] handle_mm_fault+0x171e/0x36f0 mm/memory.c:5450 do_user_addr_fault arch/x86/mm/fault.c:1364 [inline] handle_page_fault arch/x86/mm/fault.c:1507 [inline] exc_page_fault+0x47f/0x860 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0033:0x7f4b3b5edb6a Code: c7 04 25 40 00 00 20 66 32 66 73 c6 04 25 44 00 00 20 00 e9 0f fa ff ff 0f 1f 84 00 00 00 00 00 48 b8 2e 2f 66 69 6c 65 32 00 <48> 89 04 25 80 00 00 20 e9 21 fa ff ff 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f4b3b5e0170 EFLAGS: 00010246 RAX: 0032656c69662f2e RBX: 00007f4b3b6b66e8 RCX: 0000000000000000 RDX: 8b75c404b4354ef2 RSI: 0000000000000000 RDI: 00007f4b3b5e05a0 RBP: 00007f4b3b6b66e0 R08: 00007f4b3b5e0170 R09: 00007f4b3b6b66e0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4b3b6b66ec R13: 0000000000000011 R14: 00007fff82c05200 R15: 00007fff82c052e8 Allocated by task 9950: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x70 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc+0x15a/0x390 mm/slub.c:3867 vm_area_alloc+0x24/0x1d0 kernel/fork.c:465 mmap_region+0xc4f/0x22e0 mm/mmap.c:2804 do_mmap+0x8bd/0xf80 mm/mmap.c:1379 vm_mmap_pgoff+0x1dc/0x3f0 mm/util.c:556 ksys_mmap_pgoff+0x36a/0x460 mm/mmap.c:1425 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8c/0x1a0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 9984: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x70 mm/kasan/common.c:68 kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:634 poison_slab_object+0xee/0x1a0 mm/kasan/common.c:241 __kasan_slab_free+0x34/0x60 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x136/0x330 mm/slub.c:4363 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0xcbf/0x15e0 kernel/rcu/tree.c:2431 __do_softirq+0x1c9/0x57e kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:580 __call_rcu_common kernel/rcu/tree.c:2681 [inline] call_rcu+0x159/0x8e0 kernel/rcu/tree.c:2795 remove_vma mm/mmap.c:148 [inline] remove_mt mm/mmap.c:2283 [inline] do_vmi_align_munmap+0x1448/0x17c0 mm/mmap.c:2629 do_vmi_munmap+0x24d/0x2d0 mm/mmap.c:2693 mmap_region+0x6bb/0x22e0 mm/mmap.c:2744 do_mmap+0x8bd/0xf80 mm/mmap.c:1379 vm_mmap_pgoff+0x1dc/0x3f0 mm/util.c:556 ksys_mmap_pgoff+0x36a/0x460 mm/mmap.c:1425 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8c/0x1a0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88802ded3220 which belongs to the cache vm_area_struct of size 192 The buggy address is located 32 bytes inside of freed 192-byte region [ffff88802ded3220, ffff88802ded32e0) The buggy address belongs to the physical page: page:ffffea0000b7b4c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ded3 memcg:ffff88802ccc0701 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff8880132b0b40 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800f000f 00000001ffffffff ffff88802ccc0701 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 9978, tgid 9978 (dhcpcd-run-hook), ts 442626197804, free_ts 442625298575 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x10b/0x130 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x345c/0x35f0 mm/page_alloc.c:3311 __alloc_pages+0x255/0x650 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2190 allocate_slab mm/slub.c:2354 [inline] new_slab+0x70/0x270 mm/slub.c:2407 ___slab_alloc+0xa79/0x10a0 mm/slub.c:3540 __slab_alloc mm/slub.c:3625 [inline] __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc+0x231/0x390 mm/slub.c:3867 vm_area_dup+0x27/0x280 kernel/fork.c:480 __split_vma+0x128/0xc00 mm/mmap.c:2333 do_vmi_align_munmap+0x3a6/0x17c0 mm/mmap.c:2534 do_vmi_munmap+0x24d/0x2d0 mm/mmap.c:2693 mmap_region+0x6bb/0x22e0 mm/mmap.c:2744 do_mmap+0x8bd/0xf80 mm/mmap.c:1379 vm_mmap_pgoff+0x1dc/0x3f0 mm/util.c:556 ksys_mmap_pgoff+0x36a/0x460 mm/mmap.c:1425 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8c/0x1a0 arch/x86/entry/common.c:83 page last free pid 16 tgid 16 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x892/0x9b0 mm/page_alloc.c:2346 free_unref_page+0x37/0x3a0 mm/page_alloc.c:2486 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0xcbf/0x15e0 kernel/rcu/tree.c:2431 __do_softirq+0x1c9/0x57e kernel/softirq.c:553 Memory state around the buggy address: ffff88802ded3100: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802ded3180: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88802ded3200: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802ded3280: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88802ded3300: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ==================================================================