EXT4-fs error (device loop4): ext4_ext_precache:625: inode #15: comm syz.4.16: pblk 129 bad header/extent: invalid magic - magic 0, entries 59906, max 1(0), depth 0(0) ================================================================== 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 ffff8881283ed018 by task syz.4.16/360 CPU: 0 PID: 360 Comm: syz.4.16 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 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+0x20b/0x5dd0 fs/ext4/extents.c:4166 ext4_map_blocks+0x985/0x1bd0 fs/ext4/inode.c:674 ext4_alloc_file_blocks+0x396/0xb40 fs/ext4/extents.c:4529 ext4_fallocate+0x798/0x1a70 fs/ext4/extents.c:4814 vfs_fallocate+0x4b4/0x590 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f19f838c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f19f6de7028 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f19f8605fa0 RCX: 00007f19f838c819 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007 RBP: 00007f19f8422c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000006000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f19f8606038 R14: 00007f19f8605fa0 R15: 00007ffcdd1404f8 Allocated by task 276: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x162/0x2d0 mm/slub.c:2965 getname_kernel+0x59/0x2e0 fs/namei.c:221 kern_path+0x1f/0x40 fs/namei.c:2555 do_loopback+0xcd/0x480 fs/namespace.c:2389 path_mount+0x4e6/0xc90 fs/namespace.c:3330 do_mount fs/namespace.c:3349 [inline] __do_sys_mount fs/namespace.c:3557 [inline] __se_sys_mount+0x320/0x390 fs/namespace.c:3534 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3534 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 276: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 putname fs/namei.c:262 [inline] filename_lookup+0x4b3/0x6a0 fs/namei.c:2478 kern_path+0x35/0x40 fs/namei.c:2555 do_loopback+0xcd/0x480 fs/namespace.c:2389 path_mount+0x4e6/0xc90 fs/namespace.c:3330 do_mount fs/namespace.c:3349 [inline] __do_sys_mount fs/namespace.c:3557 [inline] __se_sys_mount+0x320/0x390 fs/namespace.c:3534 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3534 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff8881283ec400 which belongs to the cache names_cache of size 4096 The buggy address is located 3096 bytes inside of 4096-byte region [ffff8881283ec400, ffff8881283ed400) The buggy address belongs to the page: page:ffffea0004a0fa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1283e8 head:ffffea0004a0fa00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810018b500 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 276, ts 23215949058, free_ts 0 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+0x223b/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1ac/0x2d0 mm/slub.c:2965 getname_kernel+0x59/0x2e0 fs/namei.c:221 kern_path+0x1f/0x40 fs/namei.c:2555 do_loopback+0xcd/0x480 fs/namespace.c:2389 path_mount+0x4e6/0xc90 fs/namespace.c:3330 do_mount fs/namespace.c:3349 [inline] __do_sys_mount fs/namespace.c:3557 [inline] __se_sys_mount+0x320/0x390 fs/namespace.c:3534 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3534 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb page_owner free stack trace missing Memory state around the buggy address: ffff8881283ecf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881283ecf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881283ed000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881283ed080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881283ed100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop4): ext4_map_blocks:740: inode #15: block 641: comm syz.4.16: lblock 1 mapped to illegal pblock 641 (length 15)