================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x77/0x2050 kernel/locking/lockdep.c:5065 Read of size 8 at addr ffffc900045bf898 by task syz.0.16/5360 CPU: 1 UID: 0 PID: 5360 Comm: syz.0.16 Not tainted 6.12.0-rc1-syzkaller-00046-g7ec462100ef9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:435 shrink_slab+0x1093/0x14d0 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+0x550/0x8b0 fs/proc/proc_sysctl.c:595 iter_file_splice_write+0xbfa/0x1510 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x11b/0x220 fs/splice.c:1164 splice_direct_to_actor+0x586/0xc80 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x289/0x3e0 fs/splice.c:1233 do_sendfile+0x561/0xe10 fs/read_write.c:1388 __do_sys_sendfile64 fs/read_write.c:1449 [inline] __se_sys_sendfile64+0x100/0x1e0 fs/read_write.c:1441 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:0x7f293237dff9 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:00007f293316c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f2932535f80 RCX: 00007f293237dff9 RDX: 0000000020002080 RSI: 0000000000000006 RDI: 0000000000000007 RBP: 00007f29323f0296 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2932535f80 R15: 00007fff1cb34248 The buggy address belongs to the virtual mapping at [ffffc900045b8000, ffffc900045c1000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2206 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880271b9e88 pfn:0x271b9 memcg:ffff8880303d3b82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff8880271b9e88 0000000000000000 00000001ffffffff ffff8880303d3b82 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 5363, tgid 5363 (syz.4.19), ts 64728285039, free_ts 63873097735 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3039/0x3180 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4733 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:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1115 copy_process+0x5d1/0x3d50 kernel/fork.c:2206 kernel_clone+0x223/0x880 kernel/fork.c:2787 __do_sys_clone3 kernel/fork.c:3091 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3070 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 25 tgid 25 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcd0/0xf00 mm/page_alloc.c:2638 vfree+0x186/0x2e0 mm/vmalloc.c:3361 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3282 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffffc900045bf780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900045bf800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900045bf880: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc900045bf900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc900045bf980: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================