================================================================== BUG: KASAN: use-after-free in strlen+0x53/0x60 lib/string.c:581 Read of size 1 at addr ffff8880577f0008 by task syz.3.2525/21652 CPU: 1 PID: 21652 Comm: syz.3.2525 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 strlen+0x53/0x60 lib/string.c:581 set_de_name_and_namelen fs/reiserfs/namei.c:82 [inline] search_by_entry_key+0xa84/0x1370 fs/reiserfs/namei.c:172 reiserfs_readdir_inode+0x22c/0x1240 fs/reiserfs/dir.c:98 iterate_dir+0x218/0x560 fs/readdir.c:-1 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0xe5/0x250 fs/readdir.c:271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ff4b804fbe9 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:00007ff4b62b7038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007ff4b8276fa0 RCX: 00007ff4b804fbe9 RDX: 000000000000003d RSI: 0000200000000040 RDI: 0000000000000008 RBP: 00007ff4b80d2e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff4b8277038 R14: 00007ff4b8276fa0 R15: 00007fffc8116898 The buggy address belongs to the page: page:ffffea00015dfc00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x100 pfn:0x577f0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001664d08 ffffea00015a3e08 0000000000000000 raw: 0000000000000100 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x1100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 21513, ts 940578929366, free_ts 940914769035 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 alloc_pages_vma+0x393/0x7c0 mm/mempolicy.c:2146 do_anonymous_page mm/memory.c:3838 [inline] handle_pte_fault mm/memory.c:4648 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x2382/0x43c0 mm/memory.c:4883 faultin_page mm/gup.c:976 [inline] __get_user_pages+0x93e/0x11c0 mm/gup.c:1197 faultin_vma_page_range+0x1e0/0x260 mm/gup.c:1590 madvise_populate mm/madvise.c:856 [inline] madvise_vma mm/madvise.c:1004 [inline] do_madvise+0x9dc/0x2b60 mm/madvise.c:1207 __do_sys_madvise mm/madvise.c:1233 [inline] __se_sys_madvise mm/madvise.c:1231 [inline] __x64_sys_madvise+0xa2/0xb0 mm/madvise.c:1231 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xc5/0x170 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1456 [inline] zap_pmd_range mm/memory.c:1505 [inline] zap_pud_range mm/memory.c:1534 [inline] zap_p4d_range mm/memory.c:1555 [inline] unmap_page_range+0x2096/0x2520 mm/memory.c:1576 unmap_vmas+0x11b/0x230 mm/memory.c:1653 exit_mmap+0x38f/0x5f0 mm/mmap.c:3212 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x567/0x6c0 kernel/exit.c:550 do_exit+0x5a1/0x20a0 kernel/exit.c:870 do_group_exit+0x12e/0x300 kernel/exit.c:997 __do_sys_exit_group kernel/exit.c:1008 [inline] __se_sys_exit_group kernel/exit.c:1006 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1006 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff8880577eff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880577eff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880577f0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880577f0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880577f0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================