================================================================== BUG: KASAN: use-after-free in nilfs_find_entry+0x26c/0x5fc fs/nilfs2/dir.c:321 Read of size 2 at addr ffff0000f2ec4008 by task syz.2.3/6529 CPU: 0 UID: 0 PID: 6529 Comm: syz.2.3 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379 nilfs_find_entry+0x26c/0x5fc fs/nilfs2/dir.c:321 nilfs_inode_by_name+0xac/0x224 fs/nilfs2/dir.c:394 nilfs_lookup+0xdc/0x1d8 fs/nilfs2/namei.c:63 lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1633 filename_create+0x230/0x468 fs/namei.c:4027 do_mkdirat+0xac/0x574 fs/namei.c:4272 __do_sys_mkdirat fs/namei.c:4295 [inline] __se_sys_mkdirat fs/namei.c:4293 [inline] __arm64_sys_mkdirat+0x8c/0xa4 fs/namei.c:4293 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x132ec4 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffdffc3cbb148 ffff0001b364f8b0 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f2ec3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000f2ec3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000f2ec4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000f2ec4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000f2ec4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== NILFS error (device loop2): nilfs_find_entry: zero-length directory entry Remounting filesystem read-only netlink: 8 bytes leftover after parsing attributes in process `syz.2.3'. NILFS error (device loop2): nilfs_find_entry: zero-length directory entry