loop1: detected capacity change from 0 to 32768 ialloc: diAlloc returned -5! ialloc: diAlloc returned -5! ================================================================== BUG: KASAN: stack-out-of-bounds in dtReadNext fs/jfs/jfs_dtree.c:3194 [inline] BUG: KASAN: stack-out-of-bounds in jfs_readdir+0x2fad/0x4660 fs/jfs/jfs_dtree.c:2862 Read of size 8 at addr ffffc90004bafb98 by task syz.1.522/9696 CPU: 1 UID: 0 PID: 9696 Comm: syz.1.522 Not tainted 6.11.0-rc7-syzkaller-00020-g8d8d276ba2fb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 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 dtReadNext fs/jfs/jfs_dtree.c:3194 [inline] jfs_readdir+0x2fad/0x4660 fs/jfs/jfs_dtree.c:2862 wrap_directory_iterator+0x94/0xe0 fs/readdir.c:65 iterate_dir+0x57a/0x810 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:324 [inline] __se_sys_getdents+0x1ef/0x4d0 fs/readdir.c:309 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:0x7f16a837def9 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:00007f16a9145038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f16a8535f80 RCX: 00007f16a837def9 RDX: 0000000000000058 RSI: 0000000000000000 RDI: 0000000000000007 RBP: 00007f16a83f09f6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f16a8535f80 R15: 00007fffff2058c8 The buggy address belongs to stack of task syz.1.522/9696 and is located at offset 120 in frame: jfs_readdir+0x0/0x4660 fs/jfs/jfs_dtree.c:2578 This frame has 4 objects: [32, 40) 'inode.addr.i' [64, 72) 'lblock.i' [96, 104) 'mp.i' [128, 336) 'btstack' The buggy address belongs to the virtual mapping at [ffffc90004ba8000, ffffc90004bb1000) created by: copy_process+0x5d1/0x3dc0 kernel/fork.c:2204 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x400 pfn:0x25458 memcg:ffff88802585a902 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000400 0000000000000000 00000001ffffffff ffff88802585a902 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 2, tgid 2 (kthreadd), ts 263534807944, free_ts 263436281718 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 vm_area_alloc_pages mm/vmalloc.c:3587 [inline] __vmalloc_area_node mm/vmalloc.c:3656 [inline] __vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3837 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1113 copy_process+0x5d1/0x3dc0 kernel/fork.c:2204 kernel_clone+0x223/0x880 kernel/fork.c:2781 kernel_thread+0x1bc/0x240 kernel/fork.c:2843 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x60d/0x810 kernel/kthread.c:765 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 7665 tgid 7665 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_folios+0x100f/0x1ac0 mm/page_alloc.c:2667 folios_put_refs+0x76e/0x860 mm/swap.c:1039 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x47b/0xfc0 mm/truncate.c:346 f2fs_put_super+0x701/0x1150 fs/f2fs/super.c:1633 generic_shutdown_super+0x136/0x2d0 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1696 kill_f2fs_super+0x344/0x690 fs/f2fs/super.c:4898 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:228 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2f/0x27f0 kernel/exit.c:882 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 __do_sys_exit_group kernel/exit.c:1042 [inline] __se_sys_exit_group kernel/exit.c:1040 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040 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: ffffc90004bafa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004bafb00: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2 >ffffc90004bafb80: 00 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc90004bafc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 ffffc90004bafc80: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================