EXT4-fs error (device loop6): ext4_xattr_block_get:546: inode #15: comm syz.6.16: corrupted xattr block 19 ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:953 Read of size 4 at addr ffff888126be584c by task syz.6.16/564 CPU: 1 PID: 564 Comm: syz.6.16 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_ext_binsearch fs/ext4/extents.c:837 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:953 ext4_ext_remove_space+0x2b6/0x3fb0 fs/ext4/extents.c:2833 ext4_punch_hole+0x77c/0xbd0 fs/ext4/inode.c:4139 ext4_fallocate+0x2b6/0x1dd0 fs/ext4/extents.c:4760 vfs_fallocate+0x4c5/0x5a0 fs/open.c:323 ksys_fallocate fs/open.c:346 [inline] __do_sys_fallocate fs/open.c:354 [inline] __se_sys_fallocate fs/open.c:352 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:352 x64_sys_call+0x7fa/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fc84ff8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc850e2a038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fc8501b5fa0 RCX: 00007fc84ff8e929 RDX: 0000000000000004 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007fc850010b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc8501b5fa0 R15: 00007fff1130af98 The buggy address belongs to the physical page: page:ffffea00049af940 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x126be5 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00049af988 ffffea00049af908 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 473, tgid 473 (syz-executor), ts 49836727290, free_ts 49946772611 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d0/0x1f0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x2e63/0x2ef0 mm/page_alloc.c:4328 __alloc_pages+0x235/0x4b0 mm/page_alloc.c:5614 __folio_alloc+0x12/0x40 mm/page_alloc.c:5646 __folio_alloc_node include/linux/gfp.h:246 [inline] folio_alloc include/linux/gfp.h:275 [inline] alloc_page_vma include/linux/gfp.h:284 [inline] do_anonymous_page mm/memory.c:4191 [inline] handle_pte_fault mm/memory.c:5029 [inline] __handle_mm_fault mm/memory.c:5173 [inline] handle_mm_fault+0x17b4/0x23d0 mm/memory.c:5294 do_user_addr_fault+0x530/0xaf0 arch/x86/mm/fault.c:1340 handle_page_fault arch/x86/mm/fault.c:1431 [inline] exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1487 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1532 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3384 free_unref_page_list+0xba/0x7c0 mm/page_alloc.c:3525 release_pages+0xad1/0xb20 mm/swap.c:1035 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:314 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1aa/0x370 mm/mmu_gather.c:361 unmap_region+0x272/0x2c0 mm/mmap.c:2331 do_mas_align_munmap+0x83f/0xf20 mm/mmap.c:2580 do_mas_munmap+0x241/0x2b0 mm/mmap.c:2638 __vm_munmap+0x18a/0x290 mm/mmap.c:2924 __do_sys_munmap mm/mmap.c:2949 [inline] __se_sys_munmap mm/mmap.c:2946 [inline] __x64_sys_munmap+0x60/0x70 mm/mmap.c:2946 x64_sys_call+0x8a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888126be5700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888126be5780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888126be5800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888126be5880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888126be5900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== syz.6.16 (564) used greatest stack depth: 22144 bytes left