================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x77/0x2050 kernel/locking/lockdep.c:5065 Read of size 8 at addr ffffc9000b4ef878 by task syz.9.311/8584 CPU: 0 UID: 0 PID: 8584 Comm: syz.9.311 Not tainted 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 __lock_acquire+0x77/0x2050 kernel/locking/lockdep.c:5065 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down+0x39/0xc0 kernel/locking/semaphore.c:59 xfs_buf_lock+0x164/0x510 fs/xfs/xfs_buf.c:1196 xfs_buf_delwri_submit_buffers+0x149/0x980 fs/xfs/xfs_buf.c:2293 xfs_buf_delwri_submit+0xba/0x270 fs/xfs/xfs_buf.c:2371 xfs_qm_shrink_scan+0x1ee/0x400 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x701/0x1160 mm/shrinker.c:437 shrink_slab+0x1093/0x14d0 mm/shrinker.c:664 drop_slab_node mm/vmscan.c:414 [inline] drop_slab+0x142/0x280 mm/vmscan.c:432 drop_caches_sysctl_handler+0xbc/0x160 fs/drop_caches.c:68 proc_sys_call_handler+0x550/0x8b0 fs/proc/proc_sysctl.c:595 do_iter_readv_writev+0x600/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1064 do_writev+0x1b1/0x350 fs/read_write.c:1111 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd8b637e719 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:00007fd8b71bc038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007fd8b6535f80 RCX: 00007fd8b637e719 RDX: 0000000000000001 RSI: 00000000200000c0 RDI: 000000000000000b RBP: 00007fd8b63f1616 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd8b6535f80 R15: 00007ffd9d177148 The buggy address belongs to the virtual mapping at [ffffc9000b4e8000, ffffc9000b4f1000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2204 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x1fe pfn:0x333ee memcg:ffff88803323ed82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 00000000000001fe 0000000000000000 00000001ffffffff ffff88803323ed82 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 2, tgid 2 (kthreadd), ts 241312752073, free_ts 238548487595 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1541 prep_new_page mm/page_alloc.c:1549 [inline] get_page_from_freelist+0x363e/0x3790 mm/page_alloc.c:3459 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4735 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3568 [inline] __vmalloc_area_node mm/vmalloc.c:3646 [inline] __vmalloc_node_range_noprof+0xa2b/0x13f0 mm/vmalloc.c:3828 alloc_thread_stack_node kernel/fork.c:315 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1116 copy_process+0x5d1/0x3d50 kernel/fork.c:2204 kernel_clone+0x223/0x880 kernel/fork.c:2786 kernel_thread+0x1bc/0x240 kernel/fork.c:2848 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x60d/0x810 kernel/kthread.c:767 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 8480 tgid 8480 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1112 [inline] free_unref_page+0xcd0/0xf00 mm/page_alloc.c:2642 tlb_batch_list_free mm/mmu_gather.c:159 [inline] tlb_finish_mmu+0x11f/0x200 mm/mmu_gather.c:468 exit_mmap+0x496/0xc40 mm/mmap.c:1936 __mmput+0x115/0x380 kernel/fork.c:1348 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x28e0 kernel/exit.c:926 do_group_exit+0x207/0x2c0 kernel/exit.c:1088 __do_sys_exit_group kernel/exit.c:1099 [inline] __se_sys_exit_group kernel/exit.c:1097 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1097 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000b4ef700: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc9000b4ef780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000b4ef800: 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 ^ ffffc9000b4ef880: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000b4ef900: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3 ==================================================================