REISERFS (device loop0): journal params: device loop0, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using r5 hash to sort names REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in strlen+0x7d/0xa0 lib/string.c:418 Read of size 1 at addr ffff8880729299cc by task syz-executor365/5077 CPU: 1 PID: 5077 Comm: syz-executor365 Not tainted 6.2.0-rc2-next-20230105-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report+0xc0/0xf0 mm/kasan/report.c:517 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:0x7fa3d87c6ba9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 17 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:00007ffe33e340b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fa3d8835640 RCX: 00007fa3d87c6ba9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000010e3 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000003 R14: 00007ffe33e340f0 R15: 000000000000000c The buggy address belongs to the physical page: page:ffffea0001ca4a40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x72929 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001ca4a88 ffffea0001ca4a08 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 14120767720, free_ts 15091297376 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:9379 __alloc_contig_pages mm/page_alloc.c:9402 [inline] alloc_contig_pages+0x35e/0x4c0 mm/page_alloc.c:9479 debug_vm_pgtable_alloc_huge_page mm/debug_vm_pgtable.c:1065 [inline] init_args mm/debug_vm_pgtable.c:1188 [inline] debug_vm_pgtable+0x899/0x296f mm/debug_vm_pgtable.c:1226 do_one_initcall+0x141/0x7d0 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 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:1448 [inline] free_pcp_prepare+0x4d0/0x9e0 mm/page_alloc.c:1498 free_unref_page_prepare mm/page_alloc.c:3384 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3479 free_contig_range+0xb5/0x180 mm/page_alloc.c:9501 destroy_args+0xa8/0x64c mm/debug_vm_pgtable.c:998 debug_vm_pgtable+0x28de/0x296f mm/debug_vm_pgtable.c:1318 do_one_initcall+0x141/0x7d0 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888072929880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072929900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888072929980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888072929a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072929a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================