loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: stack-out-of-bounds in dtReadNext fs/jfs/jfs_dtree.c:3192 [inline] BUG: KASAN: stack-out-of-bounds in jfs_readdir+0x2fad/0x4660 fs/jfs/jfs_dtree.c:2860 Read of size 8 at addr ffffc90004b2fb98 by task syz.0.441/9391 CPU: 0 PID: 9391 Comm: syz.0.441 Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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 dtReadNext fs/jfs/jfs_dtree.c:3192 [inline] jfs_readdir+0x2fad/0x4660 fs/jfs/jfs_dtree.c:2860 wrap_directory_iterator+0x94/0xe0 fs/readdir.c:65 iterate_dir+0x57a/0x810 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:392 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:0x7f6988d75ad9 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:00007f6989b88048 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f6988f03f60 RCX: 00007f6988d75ad9 RDX: 0000000000000022 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f6988de4e5d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f6988f03f60 R15: 00007ffe9bd09048 The buggy address belongs to stack of task syz.0.441/9391 and is located at offset 120 in frame: jfs_readdir+0x0/0x4660 fs/jfs/jfs_dtree.c:2576 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 [ffffc90004b28000, ffffc90004b31000) created by: copy_process+0x5d1/0x3dc0 kernel/fork.c:2203 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88806b1a02d0 pfn:0x6b1a0 memcg:ffff888022373302 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88806b1a02d0 0000000000000000 00000001ffffffff ffff888022373302 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 9339, tgid 9339 (syz.0.436), ts 342064013224, free_ts 341936208340 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1473 prep_new_page mm/page_alloc.c:1481 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3425 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4683 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3583 [inline] __vmalloc_area_node mm/vmalloc.c:3659 [inline] __vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3840 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1111 copy_process+0x5d1/0x3dc0 kernel/fork.c:2203 kernel_clone+0x223/0x870 kernel/fork.c:2780 __do_sys_clone3 kernel/fork.c:3084 [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 8915 tgid 8915 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1093 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2588 __slab_free+0x31b/0x3d0 mm/slub.c:4349 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3940 [inline] slab_alloc_node mm/slub.c:4002 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4009 getname_flags+0xb7/0x540 fs/namei.c:139 getname fs/namei.c:225 [inline] __do_sys_unlink fs/namei.c:4534 [inline] __se_sys_unlink fs/namei.c:4532 [inline] __x64_sys_unlink+0x3a/0x50 fs/namei.c:4532 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: ffffc90004b2fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004b2fb00: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2 >ffffc90004b2fb80: 00 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc90004b2fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 ffffc90004b2fc80: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================