================================================================== BUG: KASAN: use-after-free in strlen+0x7d/0xa0 lib/string.c:418 Read of size 1 at addr ffff88806e08f9cc by task syz-executor401/4991 CPU: 1 PID: 4991 Comm: syz-executor401 Not tainted 6.4.0-rc5-syzkaller-00305-g022ce8862dff #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 strlen+0x7d/0xa0 lib/string.c:418 __fortify_strlen include/linux/fortify-string.h:241 [inline] set_de_name_and_namelen+0x4c4/0x6a0 fs/reiserfs/namei.c:82 search_by_entry_key+0x4f3/0x960 fs/reiserfs/namei.c:172 reiserfs_readdir_inode+0x24f/0x13b0 fs/reiserfs/dir.c:98 iterate_dir+0x56e/0x6f0 fs/readdir.c:65 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3b9fcb6859 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd82d64558 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3b9fcb6859 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007ffd82d64560 R08: 6c616b7a79732f2e R09: 6c616b7a79732f2e R10: 00000000000010e3 R11: 0000000000000246 R12: 00007f3b9fc76130 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea0001b823c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6e08f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea0001b82408 ffffea0001b82388 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 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 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 13385607540, free_ts 14296278095 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 split_map_pages+0x1ef/0x520 mm/compaction.c:97 isolate_freepages_range+0x313/0x350 mm/compaction.c:735 alloc_contig_range+0x2fa/0x4a0 mm/page_alloc.c:6869 __alloc_contig_pages mm/page_alloc.c:6892 [inline] alloc_contig_pages+0x361/0x4d0 mm/page_alloc.c:6972 debug_vm_pgtable_alloc_huge_page mm/debug_vm_pgtable.c:1090 [inline] init_args mm/debug_vm_pgtable.c:1273 [inline] debug_vm_pgtable+0x91f/0x4210 mm/debug_vm_pgtable.c:1311 do_one_initcall+0x102/0x540 init/main.c:1246 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x64e/0xba0 init/main.c:1571 kernel_init+0x1e/0x2c0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 free_contig_range+0xb5/0x180 mm/page_alloc.c:6994 destroy_args+0x6c4/0x920 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x2412/0x4210 mm/debug_vm_pgtable.c:1403 do_one_initcall+0x102/0x540 init/main.c:1246 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x64e/0xba0 init/main.c:1571 kernel_init+0x1e/0x2c0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88806e08f880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806e08f900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806e08f980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806e08fa00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806e08fa80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================