================================================================== BUG: KASAN: use-after-free in sysv_new_block+0x618/0x7e4 fs/sysv/balloc.c:113 Read of size 4 at addr ffff0000e10660c8 by task syz.1.114/7215 CPU: 1 UID: 0 PID: 7215 Comm: syz.1.114 Not tainted 6.14.0-rc7-syzkaller-ga2392f333575 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (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:408 [inline] print_report+0x198/0x550 mm/kasan/report.c:521 kasan_report+0xd8/0x138 mm/kasan/report.c:634 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 sysv_new_block+0x618/0x7e4 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:135 [inline] get_block+0x254/0x1350 fs/sysv/itree.c:254 __block_write_begin_int+0x4c4/0x1610 fs/buffer.c:2116 __block_write_begin+0x40/0x54 fs/buffer.c:2165 sysv_prepare_chunk+0x3c/0x50 fs/sysv/itree.c:471 sysv_make_empty+0xb0/0x584 fs/sysv/dir.c:262 sysv_mkdir+0x88/0x138 fs/sysv/namei.c:130 vfs_mkdir+0x27c/0x410 fs/namei.c:4313 do_mkdirat+0x250/0x584 fs/namei.c:4336 __do_sys_mkdirat fs/namei.c:4351 [inline] __se_sys_mkdirat fs/namei.c:4349 [inline] __arm64_sys_mkdirat+0x8c/0xa4 fs/namei.c:4349 __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:0x263 pfn:0x121066 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000263 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e1065f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e1066000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000e1066080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000e1066100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e1066180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== syz.1.114: attempt to access beyond end of device loop1: rw=2049, sector=6491536, nr_sectors = 2 limit=128