================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x78/0x1fd0 kernel/locking/lockdep.c:5005 Read of size 8 at addr ffffc90005647898 by task syz-executor.4/14433 CPU: 1 PID: 14433 Comm: syz-executor.4 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 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/0x1fd0 kernel/locking/lockdep.c:5005 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __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:1193 xfs_buf_delwri_submit_buffers+0x149/0x980 fs/xfs/xfs_buf.c:2290 xfs_buf_delwri_submit+0xba/0x270 fs/xfs/xfs_buf.c:2368 xfs_qm_shrink_scan+0x1ee/0x400 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x705/0x1160 mm/shrinker.c:435 shrink_slab+0x1092/0x14d0 mm/shrinker.c:662 drop_slab_node mm/vmscan.c:393 [inline] drop_slab+0x149/0x290 mm/vmscan.c:411 drop_caches_sysctl_handler+0xbc/0x160 fs/drop_caches.c:68 proc_sys_call_handler+0x551/0x8b0 fs/proc/proc_sysctl.c:595 call_write_iter include/linux/fs.h:2110 [inline] 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/0xdc0 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+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f75f467dca9 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:00007f75f53160c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f75f47abf80 RCX: 00007f75f467dca9 RDX: 0000000020000180 RSI: 0000000000000008 RDI: 0000000000000009 RBP: 00007f75f46c947e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f75f47abf80 R15: 00007fff0a37f6c8 The buggy address belongs to the virtual mapping at [ffffc90005640000, ffffc90005649000) created by: copy_process+0x5d1/0x3df0 kernel/fork.c:2220 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6df46 memcg:ffff88801e8efe82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88801e8efe82 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 12458, tgid -1859871253 (syz-executor.0), ts 12458, free_ts 698110163858 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 alloc_pages_mpol+0x3e8/0x680 mm/mempolicy.c:2264 vm_area_alloc_pages mm/vmalloc.c:3561 [inline] __vmalloc_area_node mm/vmalloc.c:3637 [inline] __vmalloc_node_range+0x9a4/0x1490 mm/vmalloc.c:3818 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct+0x3e9/0x7d0 kernel/fork.c:1115 copy_process+0x5d1/0x3df0 kernel/fork.c:2220 kernel_clone+0x223/0x870 kernel/fork.c:2797 __do_sys_clone kernel/fork.c:2940 [inline] __se_sys_clone kernel/fork.c:2924 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 12458 tgid 12458 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_folios+0x1f2/0xc10 mm/page_alloc.c:2536 folios_put_refs+0x93a/0xa60 mm/swap.c:1034 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x47b/0xfc0 mm/truncate.c:362 kill_bdev block/bdev.c:85 [inline] blkdev_flush_mapping+0x156/0x2b0 block/bdev.c:644 blkdev_put_whole block/bdev.c:651 [inline] bdev_release+0x489/0x720 block/bdev.c:1075 blkdev_release+0x15/0x20 block/fops.c:628 __fput+0x429/0x8a0 fs/file_table.c:422 task_work_run+0x24f/0x310 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [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+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x102/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc90005647780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005647800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005647880: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90005647900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc90005647980: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================