================================================================== BUG: KASAN: stack-out-of-bounds in vma_merge+0x1a90/0x1fd0 mm/mmap.c:952 Read of size 8 at addr ffffc900039afa60 by task syz-fuzzer/5075 CPU: 0 PID: 5075 Comm: syz-fuzzer Not tainted 6.3.0-rc3-next-20230323-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 vma_merge+0x1a90/0x1fd0 mm/mmap.c:952 madvise_update_vma+0x23f/0xd40 mm/madvise.c:153 madvise_vma_behavior+0x7f6/0x20e0 mm/madvise.c:1091 madvise_walk_vmas+0x1c7/0x2b0 mm/madvise.c:1260 do_madvise.part.0+0x193/0x470 mm/madvise.c:1439 do_madvise mm/madvise.c:1452 [inline] __do_sys_madvise mm/madvise.c:1452 [inline] __se_sys_madvise mm/madvise.c:1450 [inline] __x64_sys_madvise+0x117/0x150 mm/madvise.c:1450 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x46b557 Code: 8b 24 24 48 8b 6c 24 10 48 83 c4 18 c3 cc cc cc cc cc cc 48 8b 7c 24 08 48 8b 74 24 10 8b 54 24 18 48 c7 c0 1c 00 00 00 0f 05 <89> 44 24 20 c3 cc cc cc cc 48 8b 7c 24 08 8b 74 24 10 8b 54 24 14 RSP: 002b:000000c000069ea0 EFLAGS: 00000206 ORIG_RAX: 000000000000001c RAX: ffffffffffffffda RBX: 000000000000e000 RCX: 000000000046b557 RDX: 000000000000000f RSI: 0000000000200000 RDI: 000000c003800000 RBP: 000000c000069ee0 R08: 0000000000200000 R09: 000080c00380dfff R10: 00000000010e0740 R11: 0000000000000206 R12: 00000000010e06c0 R13: 0000000000000003 R14: 000000c000006820 R15: 00000000010e0700 The buggy address belongs to stack of task syz-fuzzer/5075 and is located at offset 112 in frame: vma_merge+0x0/0x1fd0 include/linux/maple_tree.h:546 This frame has 1 object: [32, 96) 'vp' The buggy address belongs to the virtual mapping at [ffffc900039a8000, ffffc900039b1000) created by: kernel_clone+0xeb/0x890 kernel/fork.c:2831 The buggy address belongs to the physical page: page:ffffea0001e28340 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78a0d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 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 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 5029, tgid 5029 (dhcpcd-run-hook), ts 70495336723, free_ts 68923502132 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0xf75/0x2aa0 mm/page_alloc.c:3493 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4759 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 vm_area_alloc_pages mm/vmalloc.c:2952 [inline] __vmalloc_area_node mm/vmalloc.c:3028 [inline] __vmalloc_node_range+0xb55/0x1380 mm/vmalloc.c:3198 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:1113 [inline] copy_process+0x133f/0x76b0 kernel/fork.c:2238 kernel_clone+0xeb/0x890 kernel/fork.c:2831 __do_sys_clone+0xba/0x100 kernel/fork.c:2974 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x4d8/0xb80 mm/page_alloc.c:2555 free_unref_page_list+0xe3/0xa70 mm/page_alloc.c:2696 release_pages+0xcd7/0x1380 mm/swap.c:1042 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x2b2/0x930 mm/mmap.c:3077 __mmput+0x13a/0x540 kernel/fork.c:1341 mmput+0x60/0x70 kernel/fork.c:1363 exit_mm kernel/exit.c:563 [inline] do_exit+0x9d7/0x29f0 kernel/exit.c:856 do_group_exit+0xd4/0x2a0 kernel/exit.c:1019 __do_sys_exit_group kernel/exit.c:1030 [inline] __se_sys_exit_group kernel/exit.c:1028 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1028 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc900039af900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900039af980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 >ffffc900039afa00: f1 f1 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 ^ ffffc900039afa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900039afb00: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 ==================================================================