loop1: detected capacity change from 0 to 32768 find_entry called with index >= next_index ================================================================== BUG: KASAN: slab-out-of-bounds in dtCompare fs/jfs/jfs_dtree.c:3317 [inline] BUG: KASAN: slab-out-of-bounds in dtSearch+0x1664/0x2520 fs/jfs/jfs_dtree.c:649 Read of size 1 at addr ffff888058414968 by task syz.1.55/5702 CPU: 0 UID: 0 PID: 5702 Comm: syz.1.55 Not tainted 6.12.0-rc4-syzkaller-00085-g4e46774408d9 #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 dtCompare fs/jfs/jfs_dtree.c:3317 [inline] dtSearch+0x1664/0x2520 fs/jfs/jfs_dtree.c:649 jfs_lookup+0x17f/0x410 fs/jfs/namei.c:1461 lookup_open fs/namei.c:3573 [inline] open_last_lookups fs/namei.c:3694 [inline] path_openat+0x11a7/0x3590 fs/namei.c:3930 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.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:0x7fd2c7d7e719 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:00007fd2c8c48038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fd2c7f35f80 RCX: 00007fd2c7d7e719 RDX: 000000000000275a RSI: 0000000020000100 RDI: ffffffffffffff9c RBP: 00007fd2c7df12be R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd2c7f35f80 R15: 00007ffdd26d4918 Allocated by task 5702: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_lru_noprof+0x139/0x2b0 mm/slub.c:4153 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode+0x65/0x1a0 fs/inode.c:265 iget_locked+0xf1/0x5a0 fs/inode.c:1418 jfs_iget+0x23/0x3e0 fs/jfs/inode.c:29 jfs_lookup+0x226/0x410 fs/jfs/namei.c:1469 lookup_one_qstr_excl+0x11f/0x260 fs/namei.c:1633 do_renameat2+0x670/0x13f0 fs/namei.c:5111 __do_sys_rename fs/namei.c:5217 [inline] __se_sys_rename fs/namei.c:5215 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5215 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 The buggy address belongs to the object at ffff888058414088 which belongs to the cache jfs_ip of size 2232 The buggy address is located 40 bytes to the right of allocated 2232-byte region [ffff888058414088, ffff888058414940) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888058411270 pfn:0x58410 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88807de9bf01 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888143ea1640 dead000000000122 0000000000000000 raw: ffff888058411270 00000000800d000b 00000001f5000000 ffff88807de9bf01 head: 00fff00000000040 ffff888143ea1640 dead000000000122 0000000000000000 head: ffff888058411270 00000000800d000b 00000001f5000000 ffff88807de9bf01 head: 00fff00000000003 ffffea0001610401 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 5323, tgid 5322 (syz.2.3), ts 62649396799, free_ts 14371802768 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+0x292/0x710 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x120 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_lru_noprof+0x1c5/0x2b0 mm/slub.c:4153 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode+0x65/0x1a0 fs/inode.c:265 new_inode_pseudo fs/inode.c:1104 [inline] new_inode+0x22/0x1d0 fs/inode.c:1123 jfs_fill_super+0x408/0xc50 fs/jfs/super.c:544 mount_bdev+0x20a/0x2d0 fs/super.c:1679 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 page last free pid 1 tgid 1 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 free_contig_range+0x152/0x550 mm/page_alloc.c:6748 destroy_args+0x8a/0x840 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x880 init/main.c:1269 do_initcall_level+0x157/0x210 init/main.c:1331 do_initcalls+0x3f/0x80 init/main.c:1347 kernel_init_freeable+0x435/0x5d0 init/main.c:1580 kernel_init+0x1d/0x2b0 init/main.c:1469 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: ffff888058414800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058414880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888058414900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888058414980: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888058414a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================