================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x78/0x2000 kernel/locking/lockdep.c:5060 Read of size 8 at addr ffffc900036ff898 by task syz-executor.2/6182 CPU: 0 PID: 6182 Comm: syz-executor.2 Not tainted 6.10.0-rc3-next-20240611-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:91 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:117 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+0x78/0x2000 kernel/locking/lockdep.c:5060 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5817 __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:435 shrink_slab+0x1090/0x14c0 mm/shrinker.c:662 drop_slab_node mm/vmscan.c:413 [inline] drop_slab+0x142/0x280 mm/vmscan.c:431 drop_caches_sysctl_handler+0xbc/0x160 fs/drop_caches.c:68 proc_sys_call_handler+0x551/0x8b0 fs/proc/proc_sysctl.c:590 iter_file_splice_write+0xbd7/0x14e0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x11e/0x220 fs/splice.c:1164 splice_direct_to_actor+0x58e/0xc90 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x28c/0x3e0 fs/splice.c:1233 do_sendfile+0x56d/0xe10 fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1356 [inline] __se_sys_sendfile64+0x100/0x1e0 fs/read_write.c:1348 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:0x7f904947cea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f904a1800c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f90495b4050 RCX: 00007f904947cea9 RDX: 0000000020002080 RSI: 0000000000000004 RDI: 0000000000000005 RBP: 00007f90494ebff4 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f90495b4050 R15: 00007ffcc0002eb8 The buggy address belongs to the virtual mapping at [ffffc900036f8000, ffffc90003701000) created by: copy_process+0x5d1/0x3dc0 kernel/fork.c:2201 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x8 pfn:0x1f962 memcg:ffff88802c481302 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000008 0000000000000000 00000001ffffffff ffff88802c481302 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 6176, tgid 6176 (syz-executor.3), ts 131399089707, free_ts 130702927810 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1470 prep_new_page mm/page_alloc.c:1478 [inline] get_page_from_freelist+0x2cbd/0x2d70 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4715 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 vm_area_alloc_pages mm/vmalloc.c:3567 [inline] __vmalloc_area_node mm/vmalloc.c:3643 [inline] __vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3824 alloc_thread_stack_node kernel/fork.c:310 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1110 copy_process+0x5d1/0x3dc0 kernel/fork.c:2201 kernel_clone+0x226/0x8f0 kernel/fork.c:2778 __do_sys_clone3 kernel/fork.c:3079 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3063 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 page last free pid 6160 tgid 6129 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1089 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2669 folios_put_refs+0x76e/0x860 mm/swap.c:1020 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3395 __mmput+0x115/0x390 kernel/fork.c:1341 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x28e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 arch_do_signal_or_restart+0x96/0x830 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900036ff780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900036ff800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900036ff880: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc900036ff900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc900036ff980: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================