================================================================== BUG: KASAN: stack-out-of-bounds in atomic_dec include/asm-generic/atomic-instrumented.h:329 [inline] BUG: KASAN: stack-out-of-bounds in mapping_unmap_writable include/linux/fs.h:604 [inline] BUG: KASAN: stack-out-of-bounds in __remove_shared_vm_struct mm/mmap.c:146 [inline] BUG: KASAN: stack-out-of-bounds in unlink_file_vma+0x17e/0x1b0 mm/mmap.c:164 Write of size 4 at addr ffff8881dd277bec by task syz.9.2546/9407 CPU: 1 PID: 9407 Comm: syz.9.2546 Not tainted 5.4.289-syzkaller-00011-g39762b7a60e9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 check_memory_region_inline mm/kasan/generic.c:141 [inline] check_memory_region+0x272/0x280 mm/kasan/generic.c:191 atomic_dec include/asm-generic/atomic-instrumented.h:329 [inline] mapping_unmap_writable include/linux/fs.h:604 [inline] __remove_shared_vm_struct mm/mmap.c:146 [inline] unlink_file_vma+0x17e/0x1b0 mm/mmap.c:164 free_pgtables+0x135/0x280 mm/memory.c:428 exit_mmap+0x2cb/0x520 mm/mmap.c:3192 __mmput+0x8e/0x2c0 kernel/fork.c:1101 exit_mm kernel/exit.c:538 [inline] do_exit+0xc08/0x2bc0 kernel/exit.c:848 do_group_exit+0x138/0x300 kernel/exit.c:984 get_signal+0xdb1/0x1440 kernel/signal.c:2738 do_signal+0xb0/0x11f0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc0/0x1a0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x199/0x200 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f4709854de9 Code: Bad RIP value. RSP: 002b:00007f4707ebf0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f4709a6dfa8 RCX: 00007f4709854de9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f4709a6dfa8 RBP: 00007f4709a6dfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4709a6dfac R13: 0000000000000000 R14: 00007ffd602b5e50 R15: 00007ffd602b5f38 The buggy address belongs to the page: page:ffffea0007749dc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 ffffea0007749d88 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] alloc_thread_stack_node kernel/fork.c:259 [inline] dup_task_struct+0x85/0x600 kernel/fork.c:886 copy_process+0x56d/0x3230 kernel/fork.c:1889 _do_fork+0x197/0x900 kernel/fork.c:2399 __do_sys_clone3 kernel/fork.c:2688 [inline] __se_sys_clone3 kernel/fork.c:2675 [inline] __x64_sys_clone3+0x2da/0x300 kernel/fork.c:2675 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x847/0x950 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4955 [inline] __free_pages+0x91/0x140 mm/page_alloc.c:4961 __free_slab+0x221/0x2e0 mm/slub.c:1774 __slab_free+0x34b/0x360 mm/slub.c:3012 qlist_free_all+0x43/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1d9/0x210 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x41/0x210 mm/kasan/common.c:507 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xd9/0x250 mm/slub.c:2842 getname_flags+0xb8/0x4e0 fs/namei.c:141 do_sys_open+0x357/0x810 fs/open.c:1117 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881dd277a80: 04 f2 04 f2 04 f2 00 f2 f2 f2 04 f2 00 00 00 00 ffff8881dd277b00: 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 >ffff8881dd277b80: 04 f2 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 ^ ffff8881dd277c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881dd277c80: 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 f2 f2 ==================================================================