ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 3 non-latin1 character 0x3a73 found in JFS file name mount with iocharset=utf8 to access ================================================================== BUG: KASAN: slab-out-of-bounds in jfs_strfromUCS_le+0x28d/0x3b0 fs/jfs/jfs_unicode.c:40 Read of size 2 at addr ffff88807a187f72 by task syz.0.6/5913 CPU: 1 UID: 0 PID: 5913 Comm: syz.0.6 Not tainted 6.13.0-rc5-syzkaller-00012-g0bc21e701a6f #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:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 jfs_strfromUCS_le+0x28d/0x3b0 fs/jfs/jfs_unicode.c:40 jfs_readdir+0x199d/0x3c50 fs/jfs/jfs_dtree.c:2975 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x571/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 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:0x7fba88385d29 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:00007fba8923a038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fba88575fa0 RCX: 00007fba88385d29 RDX: 0000000000001000 RSI: 0000000020000f80 RDI: 0000000000000008 RBP: 00007fba88401b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fba88575fa0 R15: 00007ffc2c5862d8 Allocated by task 5913: 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:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_lru_noprof+0x1dd/0x390 mm/slub.c:4187 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode+0x65/0x1a0 fs/inode.c:336 iget_locked+0xf1/0x5a0 fs/inode.c:1487 jfs_iget+0x23/0x3e0 fs/jfs/inode.c:29 jfs_fill_super+0x8e4/0xd90 fs/jfs/super.c:547 get_tree_bdev_flags+0x48c/0x5c0 fs/super.c:1636 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 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 ffff88807a186ea0 which belongs to the cache jfs_ip of size 2232 The buggy address is located 2074 bytes to the right of allocated 2232-byte region [ffff88807a186ea0, ffff88807a187758) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a180 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88802a53d901 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801e716c80 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000d000d 00000001f5000000 ffff88802a53d901 head: 00fff00000000040 ffff88801e716c80 dead000000000122 0000000000000000 head: 0000000000000000 00000000000d000d 00000001f5000000 ffff88802a53d901 head: 00fff00000000003 ffffea0001e86001 ffffffffffffffff 0000000000000000 head: 0000000700000008 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 5903, tgid 5902 (syz.0.1), ts 77238373961, free_ts 70723141318 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] kmem_cache_alloc_lru_noprof+0x26c/0x390 mm/slub.c:4187 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode+0x65/0x1a0 fs/inode.c:336 new_inode_pseudo fs/inode.c:1174 [inline] new_inode+0x22/0x1d0 fs/inode.c:1193 jfs_fill_super+0x570/0xd90 fs/jfs/super.c:511 get_tree_bdev_flags+0x48c/0x5c0 fs/super.c:1636 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 page last free pid 5803 tgid 5803 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xe23/0x1890 mm/page_alloc.c:2706 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x2ea/0x690 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 vms_clear_ptes+0x437/0x530 mm/vma.c:1143 vms_complete_munmap_vmas+0x210/0x8f0 mm/vma.c:1185 do_vmi_align_munmap+0x5ef/0x6f0 mm/vma.c:1444 do_vmi_munmap+0x24e/0x2d0 mm/vma.c:1492 __vm_munmap+0x24c/0x480 mm/mmap.c:1368 __do_sys_munmap mm/mmap.c:1385 [inline] __se_sys_munmap mm/mmap.c:1382 [inline] __x64_sys_munmap+0x60/0x70 mm/mmap.c:1382 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: ffff88807a187e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807a187e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807a187f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807a187f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807a188000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================