================================================================== BUG: KASAN: stack-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: stack-out-of-bounds in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: stack-out-of-bounds in xfs_buf_lock+0x9e/0x520 fs/xfs/xfs_buf.c:1194 Read of size 4 at addr ffffc90002b17b9c by task kswapd0/111 CPU: 1 PID: 111 Comm: kswapd0 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] xfs_buf_lock+0x9e/0x520 fs/xfs/xfs_buf.c:1194 xfs_buf_delwri_submit_buffers+0x140/0xa40 fs/xfs/xfs_buf.c:2293 xfs_buf_delwri_submit+0x8a/0x270 fs/xfs/xfs_buf.c:2371 xfs_qm_shrink_scan+0x209/0x3f0 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435 shrink_slab+0x18a/0x1310 mm/shrinker.c:662 shrink_one+0x493/0x7c0 mm/vmscan.c:4790 shrink_many mm/vmscan.c:4851 [inline] lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4951 shrink_node mm/vmscan.c:5910 [inline] kswapd_shrink_node mm/vmscan.c:6720 [inline] balance_pgdat+0x1105/0x1970 mm/vmscan.c:6911 kswapd+0x5ea/0xbf0 mm/vmscan.c:7180 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the virtual mapping at [ffffc90002b10000, ffffc90002b19000) created by: kernel_clone+0xfd/0x980 kernel/fork.c:2797 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880543423c0 pfn:0x54342 memcg:ffff88802894fd82 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff8880543423c0 0000000000000000 00000001ffffffff ffff88802894fd82 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 9499, tgid 9499 (syz-executor.0), ts 293800489123, free_ts 292041125482 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3566 [inline] __vmalloc_area_node mm/vmalloc.c:3642 [inline] __vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3823 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1115 [inline] copy_process+0x29f5/0x6f50 kernel/fork.c:2220 kernel_clone+0xfd/0x980 kernel/fork.c:2797 __do_sys_clone3+0x1f5/0x270 kernel/fork.c:3098 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] do_int80_emulation+0x104/0x200 arch/x86/entry/common.c:253 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:626 page last free pid 9445 tgid 9445 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 __put_partials+0x14c/0x170 mm/slub.c:2995 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] __do_kmalloc_node mm/slub.c:4121 [inline] __kmalloc_noprof+0x19d/0x420 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] tomoyo_encode2+0x100/0x3e0 security/tomoyo/realpath.c:45 tomoyo_encode security/tomoyo/realpath.c:80 [inline] tomoyo_realpath_from_path+0x1a7/0x710 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x273/0x480 security/tomoyo/file.c:822 security_inode_getattr+0xf4/0x160 security/security.c:2269 vfs_getattr+0x36/0xb0 fs/stat.c:173 vfs_statx+0x171/0x550 fs/stat.c:248 vfs_fstatat+0xb3/0x150 fs/stat.c:304 __do_sys_newfstatat+0xa6/0x130 fs/stat.c:468 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc90002b17a80: 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90002b17b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90002b17b80: 00 f1 f1 f1 f1 04 f2 04 f2 00 f3 f3 f3 00 00 00 ^ ffffc90002b17c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90002b17c80: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 04 f3 ==================================================================