================================================================== BUG: KASAN: slab-use-after-free in do_sync_mmap_readahead+0x41f/0x7d0 mm/filemap.c:3282 Read of size 8 at addr ffff88806eb087d0 by task syz.6.119/5889 CPU: 0 UID: 0 PID: 5889 Comm: syz.6.119 Not tainted 6.16.0-rc1-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0xf4/0x170 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 do_sync_mmap_readahead+0x41f/0x7d0 mm/filemap.c:3282 filemap_fault+0x4d0/0xd70 mm/filemap.c:3444 __do_fault+0x112/0x290 mm/memory.c:5169 do_read_fault mm/memory.c:5590 [inline] do_fault mm/memory.c:5724 [inline] do_pte_missing mm/memory.c:4251 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault mm/memory.c:6212 [inline] handle_mm_fault+0x1ba0/0x3e20 mm/memory.c:6381 faultin_page mm/gup.c:1186 [inline] __get_user_pages+0x189a/0x21e0 mm/gup.c:1488 populate_vma_page_range+0x1b5/0x260 mm/gup.c:1922 __mm_populate+0x1ea/0x2b0 mm/gup.c:2025 mm_populate include/linux/mm.h:3353 [inline] vm_mmap_pgoff+0x251/0x370 mm/util.c:584 ksys_mmap_pgoff+0x2be/0x3f0 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcf2ab8e929 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:00007fcf2b9de038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fcf2adb5fa0 RCX: 00007fcf2ab8e929 RDX: 0000000001000006 RSI: 0000000000b36000 RDI: 0000200000000000 RBP: 00007fcf2ac10b39 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcf2adb5fa0 R15: 00007ffe33968428 Allocated by task 5889: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1b1/0x400 mm/slub.c:4204 vm_area_alloc+0x1f/0x130 mm/vma_init.c:31 __mmap_new_vma mm/vma.c:2452 [inline] __mmap_region mm/vma.c:2662 [inline] mmap_region+0xcec/0x1b20 mm/vma.c:2732 do_mmap+0x95c/0xc60 mm/mmap.c:561 vm_mmap_pgoff+0x1c0/0x370 mm/util.c:579 ksys_mmap_pgoff+0x2be/0x3f0 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 23: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free_after_rcu_debug+0x131/0x290 mm/slub.c:4693 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0xbf1/0x1530 kernel/rcu/tree.c:2832 handle_softirqs+0x19a/0x500 kernel/softirq.c:579 run_ksoftirqd+0x28/0x40 kernel/softirq.c:968 smpboot_thread_fn+0x3f7/0x7d0 kernel/smpboot.c:164 kthread+0x598/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 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:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x2b5/0x460 mm/slub.c:4745 remove_vma mm/vma.c:465 [inline] vms_complete_munmap_vmas+0x390/0x680 mm/vma.c:1288 __mmap_complete mm/vma.c:2518 [inline] __mmap_region mm/vma.c:2670 [inline] mmap_region+0xc2a/0x1b20 mm/vma.c:2732 do_mmap+0x95c/0xc60 mm/mmap.c:561 vm_mmap_pgoff+0x1c0/0x370 mm/util.c:579 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88806eb08780 which belongs to the cache vm_area_struct of size 256 The buggy address is located 80 bytes inside of freed 256-byte region [ffff88806eb08780, ffff88806eb08880) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6eb08 memcg:ffff888077de1b81 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff8880112a6b40 dead000000000100 dead000000000122 raw: 0000000000000000 00000000000c000c 00000000f5000000 ffff888077de1b81 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 2656, tgid 2656 (modprobe), ts 46779968051, free_ts 46769076676 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x168/0x1a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x2954/0x2a30 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x26b/0x460 mm/page_alloc.c:4959 alloc_pages_mpol+0x150/0x320 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x350 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0x9dc/0x10e0 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_noprof+0x26e/0x400 mm/slub.c:4204 vm_area_dup+0x26/0x610 mm/vma_init.c:122 __split_vma+0x101/0x7f0 mm/vma.c:512 split_vma mm/vma.c:595 [inline] vma_modify+0x1399/0x19b0 mm/vma.c:1626 vma_modify_flags+0x1c9/0x220 mm/vma.c:1644 mprotect_fixup+0x2c4/0x790 mm/mprotect.c:658 do_mprotect_pkey+0x5d8/0x900 mm/mprotect.c:832 __do_sys_mprotect mm/mprotect.c:853 [inline] __se_sys_mprotect mm/mprotect.c:850 [inline] __x64_sys_mprotect+0x7b/0x90 mm/mprotect.c:850 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 23 tgid 23 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc66/0xe50 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2884 [inline] pagetable_dtor_free include/linux/mm.h:2982 [inline] __tlb_remove_table+0x1c3/0x2a0 include/asm-generic/tlb.h:220 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x6e/0xd0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0xbf1/0x1530 kernel/rcu/tree.c:2832 handle_softirqs+0x19a/0x500 kernel/softirq.c:579 run_ksoftirqd+0x28/0x40 kernel/softirq.c:968 smpboot_thread_fn+0x3f7/0x7d0 kernel/smpboot.c:164 kthread+0x598/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88806eb08680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806eb08700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88806eb08780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806eb08800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806eb08880: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================