================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:826 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 Read of size 4 at addr ffff888156fb3018 by task kworker/u4:0/7 CPU: 1 PID: 7 Comm: kworker/u4:0 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: writeback wb_workfn (flush-7:9) Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:826 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 ext4_ext_map_blocks+0x1dc/0x5d80 fs/ext4/extents.c:4160 ext4_map_blocks+0x978/0x1bc0 fs/ext4/inode.c:674 mpage_map_one_extent fs/ext4/inode.c:2452 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2505 [inline] ext4_writepages+0x11d5/0x2e00 fs/ext4/inode.c:2873 do_writepages+0x12a/0x270 mm/page-writeback.c:2380 __writeback_single_inode+0xd5/0xa20 fs/fs-writeback.c:1470 writeback_sb_inodes+0x860/0x1400 fs/fs-writeback.c:1733 wb_writeback+0x3e3/0xb90 fs/fs-writeback.c:1908 wb_do_writeback fs/fs-writeback.c:2053 [inline] wb_workfn+0x38f/0xe20 fs/fs-writeback.c:2094 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447 kthread+0x346/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the page: page:ffffea00055becc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x156fb3 flags: 0x4000000000000000() raw: 4000000000000000 dead000000000100 dead000000000122 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 0x101cca(GFP_HIGHUSER_MOVABLE|__GFP_WRITE), pid 14739, ts 591954683691, free_ts 591958239890 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] __page_cache_alloc include/linux/pagemap.h:290 [inline] pagecache_get_page+0x642/0x930 mm/filemap.c:1848 grab_cache_page_write_begin+0x59/0xb0 mm/filemap.c:3459 ext4_write_begin+0x27b/0x15a0 fs/ext4/inode.c:1208 ext4_da_write_begin+0x455/0xe80 fs/ext4/inode.c:3033 generic_perform_write+0x2be/0x510 mm/filemap.c:3509 ext4_buffered_write_iter+0x4b8/0x640 fs/ext4/file.c:271 ext4_file_write_iter+0x536/0x1980 fs/ext4/file.c:-1 do_iter_readv_writev+0x491/0x600 fs/read_write.c:-1 do_iter_write+0x189/0x630 fs/read_write.c:866 vfs_iter_write+0x7d/0xa0 fs/read_write.c:907 iter_file_splice_write+0x650/0xc30 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe9/0x120 fs/splice.c:936 splice_direct_to_actor+0x4c0/0xb10 fs/splice.c:891 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x12e/0x9b0 mm/page_alloc.c:3443 release_pages+0xe38/0xe80 mm/swap.c:1103 __pagevec_release+0x71/0xe0 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] truncate_inode_pages_range+0x771/0x15b0 mm/truncate.c:367 truncate_inode_pages mm/truncate.c:473 [inline] truncate_inode_pages_final+0xc0/0xd0 mm/truncate.c:524 ext4_evict_inode+0x3b8/0x1760 fs/ext4/inode.c:225 evict+0x478/0x910 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x638/0x7c0 fs/inode.c:1762 dentry_unlink_inode+0x2cf/0x380 fs/dcache.c:378 __dentry_kill+0x44f/0x650 fs/dcache.c:583 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1 dput+0x42/0x80 fs/dcache.c:883 __fput+0x4fe/0x770 fs/file_table.c:294 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x127/0x190 kernel/task_work.c:189 Memory state around the buggy address: ffff888156fb2f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888156fb2f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888156fb3000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888156fb3080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888156fb3100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs (loop9): Delayed block allocation failed for inode 15 at logical offset 203 with max blocks 1 with error 117 EXT4-fs (loop9): This should not happen!! Data will be lost