EXT4-fs error (device loop1): __ext4_get_inode_loc:4365: comm syz.1.166: Invalid inode table block 14395694394777257927 in block_group 0 EXT4-fs error (device loop1) in ext4_reserve_inode_write:5904: Corrupt filesystem EXT4-fs error (device loop1): ext4_dirty_inode:6108: inode #18: comm syz.1.166: mark_inode_dirty error ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:827 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbfb/0xe30 fs/ext4/extents.c:946 Read of size 4 at addr ffff888136b4eeb0 by task syz.1.166/935 CPU: 0 PID: 935 Comm: syz.1.166 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 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+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:827 [inline] ext4_find_extent+0xbfb/0xe30 fs/ext4/extents.c:946 ext4_ext_map_blocks+0x20c/0x6150 fs/ext4/extents.c:4182 ext4_map_blocks+0x979/0x1a50 fs/ext4/inode.c:676 _ext4_get_block+0x1ea/0x540 fs/ext4/inode.c:819 ext4_get_block_unwritten+0x2a/0x40 fs/ext4/inode.c:850 __block_write_begin_int+0x4de/0x14d0 fs/buffer.c:2012 __block_write_begin fs/buffer.c:2062 [inline] block_page_mkwrite+0x205/0x270 fs/buffer.c:2525 ext4_page_mkwrite+0x4d2/0x1320 fs/ext4/inode.c:6303 do_page_mkwrite mm/memory.c:3087 [inline] do_shared_fault mm/memory.c:4640 [inline] do_fault mm/memory.c:4713 [inline] handle_pte_fault+0x138c/0x2770 mm/memory.c:4923 __handle_mm_fault mm/memory.c:-1 [inline] do_handle_mm_fault+0x1b3b/0x1e30 mm/memory.c:5345 handle_mm_fault include/linux/mm.h:1847 [inline] do_user_addr_fault+0x808/0x11c0 arch/x86/mm/fault.c:1416 handle_page_fault arch/x86/mm/fault.c:1507 [inline] exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1560 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:606 RIP: 0033:0x7f3766e2ae4b Code: 48 01 fe 48 8d 54 11 80 0f 1f 80 00 00 00 00 c5 fe 6f 0e c5 fe 6f 56 20 c5 fe 6f 5e 40 c5 fe 6f 66 60 48 83 ee 80 c5 fd 7f 0f fd 7f 57 20 c5 fd 7f 5f 40 c5 fd 7f 67 60 48 83 ef 80 48 39 fa RSP: 002b:00007ffe33b9f358 EFLAGS: 00010203 RAX: 0000200000002840 RBX: 0000000000000004 RCX: 0000200000002840 RDX: 0000200000003cf4 RSI: 0000001b2d523a38 RDI: 0000200000002fe0 RBP: fffffffffffffffe R08: 0000000000000000 R09: 0000000000000054 R10: 0000000000001534 R11: 0000000000000001 R12: 00007ffe33b9f480 R13: 00007f37670e3fac R14: 00000000000102b5 R15: 00007f37670e3fa0 Allocated by task 288: 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:433 [inline] __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3245 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260 getname_flags+0xba/0x510 fs/namei.c:138 user_path_at_empty+0x2f/0x1c0 fs/namei.c:2890 user_path_at include/linux/namei.h:57 [inline] ksys_umount fs/namespace.c:1787 [inline] __do_sys_umount fs/namespace.c:1795 [inline] __se_sys_umount fs/namespace.c:1793 [inline] __x64_sys_umount+0xf9/0x170 fs/namespace.c:1793 x64_sys_call+0x8b7/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:167 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 Freed by task 288: 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:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3544 putname fs/namei.c:271 [inline] user_path_at_empty+0x162/0x1c0 fs/namei.c:2893 user_path_at include/linux/namei.h:57 [inline] ksys_umount fs/namespace.c:1787 [inline] __do_sys_umount fs/namespace.c:1795 [inline] __se_sys_umount fs/namespace.c:1793 [inline] __x64_sys_umount+0xf9/0x170 fs/namespace.c:1793 x64_sys_call+0x8b7/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:167 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 The buggy address belongs to the object at ffff888136b4e600 which belongs to the cache names_cache of size 4096 The buggy address is located 2224 bytes inside of 4096-byte region [ffff888136b4e600, ffff888136b4f600) The buggy address belongs to the page: page:ffffea0004dad200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x136b48 head:ffffea0004dad200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000122 ffff8881001c4600 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 101, ts 63768671513, free_ts 62967536543 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3260 getname_flags+0xba/0x510 fs/namei.c:138 getname+0x19/0x20 fs/namei.c:217 do_sys_openat2+0xeb/0x7f0 fs/open.c:1230 do_sys_open fs/open.c:1252 [inline] __do_sys_openat fs/open.c:1268 [inline] __se_sys_openat fs/open.c:1263 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1263 x64_sys_call+0x219/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:258 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1474 [inline] free_pcp_prepare mm/page_alloc.c:1546 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536 free_unref_page+0xae/0x540 mm/page_alloc.c:3618 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x6c/0x100 mm/page_alloc.c:5900 __vunmap+0x801/0x980 mm/vmalloc.c:2660 __vfree mm/vmalloc.c:2709 [inline] vfree+0x8b/0xc0 mm/vmalloc.c:2740 htable_put+0x26e/0x2a0 net/netfilter/xt_hashlimit.c:432 hashlimit_mt_destroy_v1+0x58/0x60 net/netfilter/xt_hashlimit.c:970 cleanup_match net/ipv4/netfilter/ip_tables.c:460 [inline] find_check_entry net/ipv4/netfilter/ip_tables.c:564 [inline] translate_table+0x1955/0x1f60 net/ipv4/netfilter/ip_tables.c:717 do_replace net/ipv4/netfilter/ip_tables.c:1138 [inline] do_ipt_set_ctl+0x957/0xd70 net/ipv4/netfilter/ip_tables.c:1636 nf_setsockopt+0x272/0x2a0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x2dae/0x37a0 net/ipv4/ip_sockglue.c:1442 udp_setsockopt+0x8a/0xa0 net/ipv4/udp.c:2816 sock_common_setsockopt+0xa0/0xb0 net/core/sock.c:3469 __sys_setsockopt+0x2e9/0x470 net/socket.c:2202 __do_sys_setsockopt net/socket.c:2213 [inline] __se_sys_setsockopt net/socket.c:2210 [inline] __x64_sys_setsockopt+0xbf/0xd0 net/socket.c:2210 x64_sys_call+0x982/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:55 Memory state around the buggy address: ffff888136b4ed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888136b4ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888136b4ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888136b4ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888136b4ef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop1): __ext4_get_inode_loc:4365: comm syz.1.166: Invalid inode table block 14395694394777257927 in block_group 0 EXT4-fs error (device loop1) in ext4_reserve_inode_write:5904: Corrupt filesystem EXT4-fs error (device loop1): ext4_dirty_inode:6108: inode #18: comm syz.1.166: mark_inode_dirty error EXT4-fs error (device loop1): ext4_read_block_bitmap_nowait:476: comm syz.1.166: Invalid block bitmap block 14395694394777257927 in block_group 0 EXT4-fs error (device loop1): ext4_mb_discard_group_preallocations:4970: comm syz.1.166: Error -117 reading block bitmap for 0