================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2601 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x353c/0x4180 fs/ext4/extents.c:2939 Read of size 4 at addr ffff88813f8a2c18 by task syz-executor/10775 CPU: 0 PID: 10775 Comm: syz-executor Not tainted 5.15.189-syzkaller-android13-5.15.189_r00 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_rm_leaf fs/ext4/extents.c:2601 [inline] ext4_ext_remove_space+0x353c/0x4180 fs/ext4/extents.c:2939 ext4_ext_truncate+0x1a3/0x250 fs/ext4/extents.c:4473 ext4_truncate+0x9a6/0xfa0 fs/ext4/inode.c:4281 ext4_evict_inode+0xcb9/0x1450 fs/ext4/inode.c:290 evict+0x485/0x870 fs/inode.c:650 iput_final fs/inode.c:1779 [inline] iput+0x635/0x7c0 fs/inode.c:1805 do_unlinkat+0x375/0x6b0 fs/namei.c:4355 __do_sys_unlink fs/namei.c:4396 [inline] __se_sys_unlink fs/namei.c:4394 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4394 x64_sys_call+0x878/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:88 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5404d54197 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 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:00007fff81ce13e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5404d54197 RDX: 00007fff81ce1410 RSI: 00007fff81ce14a0 RDI: 00007fff81ce14a0 RBP: 00007fff81ce14a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 00007fff81ce2590 R13: 00007f5404dd7c05 R14: 00000000000dd7f8 R15: 00007fff81ce3660 The buggy address belongs to the page: page:ffffea0004fe2880 refcount:0 mapcount:0 mapping:0000000000000000 index:0x100 pfn:0x13f8a2 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000100 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 0x100cca(GFP_HIGHUSER_MOVABLE), pid 14886, ts 899302714816, free_ts 901280557071 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] shmem_alloc_page mm/shmem.c:1591 [inline] shmem_alloc_and_acct_page+0x42b/0x870 mm/shmem.c:1616 shmem_getpage_gfp+0xfe5/0x2310 mm/shmem.c:1912 shmem_fault+0x19d/0x510 mm/shmem.c:2124 __do_fault+0x264/0x2f0 mm/memory.c:4192 do_read_fault mm/memory.c:4556 [inline] do_fault mm/memory.c:4697 [inline] handle_pte_fault+0x1a57/0x2680 mm/memory.c:4911 __handle_mm_fault mm/memory.c:-1 [inline] do_handle_mm_fault+0x1a6d/0x1d50 mm/memory.c:5333 handle_mm_fault include/linux/mm.h:1836 [inline] faultin_page mm/gup.c:976 [inline] __get_user_pages+0x7ee/0x10a0 mm/gup.c:1197 populate_vma_page_range mm/gup.c:1529 [inline] __mm_populate+0x319/0x460 mm/gup.c:1638 mm_populate include/linux/mm.h:2693 [inline] vm_mmap_pgoff+0x247/0x410 mm/util.c:560 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1643 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page_list+0x134/0x9d0 mm/page_alloc.c:3671 release_pages+0xfda/0x1030 mm/swap.c:1014 __pagevec_release+0x71/0xe0 mm/swap.c:1034 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x53f/0x13d0 mm/shmem.c:969 shmem_truncate_range mm/shmem.c:1068 [inline] shmem_evict_inode+0x1fd/0x9c0 mm/shmem.c:1150 evict+0x485/0x870 fs/inode.c:650 iput_final fs/inode.c:1779 [inline] iput+0x635/0x7c0 fs/inode.c:1805 dentry_unlink_inode+0x32f/0x3e0 fs/dcache.c:380 __dentry_kill+0x44f/0x650 fs/dcache.c:586 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1 dput+0x47/0x90 fs/dcache.c:893 __fput+0x580/0x8b0 fs/file_table.c:319 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xa7e/0x27a0 kernel/exit.c:889 Memory state around the buggy address: ffff88813f8a2b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813f8a2b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88813f8a2c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88813f8a2c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813f8a2d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================