================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:841 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0x8dc/0xa8c fs/ext4/extents.c:956 Read of size 4 at addr ffff0000e4f01018 by task syz.0.268/8380 CPU: 0 UID: 0 PID: 8380 Comm: syz.0.268 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 ext4_ext_binsearch fs/ext4/extents.c:841 [inline] ext4_find_extent+0x8dc/0xa8c fs/ext4/extents.c:956 ext4_ext_map_blocks+0x258/0x5494 fs/ext4/extents.c:4208 ext4_map_create_blocks fs/ext4/inode.c:609 [inline] ext4_map_blocks+0x6f0/0x14a8 fs/ext4/inode.c:811 _ext4_get_block+0x19c/0x4e0 fs/ext4/inode.c:910 ext4_get_block_unwritten+0x3c/0x114 fs/ext4/inode.c:943 ext4_block_write_begin+0x7ac/0x1328 fs/ext4/inode.c:1198 ext4_write_begin+0x928/0x14fc fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x28c/0xc28 fs/ext4/inode.c:3129 generic_perform_write+0x244/0x7bc mm/filemap.c:4175 ext4_buffered_write_iter+0x2b8/0x528 fs/ext4/file.c:299 ext4_file_write_iter+0x1d8/0x1864 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x540/0xa3c fs/read_write.c:686 ksys_pwrite64 fs/read_write.c:793 [inline] __do_sys_pwrite64 fs/read_write.c:801 [inline] __se_sys_pwrite64 fs/read_write.c:798 [inline] __arm64_sys_pwrite64+0x170/0x208 fs/read_write.c:798 __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+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x542 pfn:0x124f01 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffdffc393c088 fffffdffc393c008 0000000000000000 raw: 0000000000000542 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e4f00f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e4f00f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000e4f01000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000e4f01080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e4f01100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================