EXT4-fs error (device loop0): ext4_free_blocks:5687: comm syz-executor: Freeing blocks not in datazone - block = 41, count = 1 EXT4-fs (loop0): Remounting filesystem read-only ================================================================== BUG: KASAN: out-of-bounds in ext4_ext_rm_leaf fs/ext4/extents.c:2706 [inline] BUG: KASAN: out-of-bounds in ext4_ext_remove_space+0x1fbc/0x4e10 fs/ext4/extents.c:2928 Read of size 18446744073709551604 at addr ffff88811ee6f018 by task syz-executor/534 CPU: 1 PID: 534 Comm: syz-executor Not tainted 5.10.225-syzkaller-1003235-g8d23314f588a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 ext4_ext_rm_leaf fs/ext4/extents.c:2706 [inline] ext4_ext_remove_space+0x1fbc/0x4e10 fs/ext4/extents.c:2928 ext4_punch_hole+0x720/0xb10 fs/ext4/inode.c:4216 ext4_fallocate+0x2e8/0x1ca0 fs/ext4/extents.c:4735 vfs_fallocate+0x492/0x570 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+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f403b281f69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f403ade30c8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f403b3b9050 RCX: 00007f403b281f69 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f403b2df6fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f403b3b9050 R15: 00007ffc63965628 The buggy address belongs to the page: page:ffffea00047b9bc0 refcount:2 mapcount:0 mapping:ffff88810044a8d0 index:0x27 pfn:0x11ee6f aops:def_blk_aops ino:0 flags: 0x4000000000002036(referenced|uptodate|lru|active|private) raw: 4000000000002036 ffffea00047b9d08 ffffea000452f408 ffff88810044a8d0 raw: 0000000000000027 ffff888122c892a0 00000002ffffffff ffff888120058000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888120058000 page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 530, ts 51957793312, free_ts 51227936441 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 __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+0x669/0x950 mm/filemap.c:1848 find_or_create_page include/linux/pagemap.h:402 [inline] grow_dev_page fs/buffer.c:976 [inline] grow_buffers fs/buffer.c:1045 [inline] __getblk_slow fs/buffer.c:1072 [inline] __getblk_gfp+0x221/0x7e0 fs/buffer.c:1370 sb_getblk_gfp include/linux/buffer_head.h:368 [inline] ext4_ext_grow_indepth fs/ext4/extents.c:1325 [inline] ext4_ext_create_new_leaf fs/ext4/extents.c:1424 [inline] ext4_ext_insert_extent+0xf88/0x4d20 fs/ext4/extents.c:2094 ext4_split_extent_at+0x812/0x1110 fs/ext4/extents.c:3225 ext4_split_extent+0x1bd/0x4e0 fs/ext4/extents.c:3326 ext4_split_convert_extents fs/ext4/extents.c:3686 [inline] ext4_ext_handle_unwritten_extents fs/ext4/extents.c:3848 [inline] ext4_ext_map_blocks+0x2206/0x6ee0 fs/ext4/extents.c:4203 ext4_map_blocks+0xa65/0x1d10 fs/ext4/inode.c:673 _ext4_get_block+0x21b/0x610 fs/ext4/inode.c:816 ext4_get_block_unwritten+0x2a/0x40 fs/ext4/inode.c:847 ext4_block_write_begin+0x61e/0x13b0 fs/ext4/inode.c:1100 ext4_write_begin+0x6fa/0x1730 ext4_da_write_begin+0x49d/0xf60 fs/ext4/inode.c:3032 generic_perform_write+0x2cd/0x570 mm/filemap.c:3509 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+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:326 exit_mmap+0x312/0x5c0 mm/mmap.c:3357 __mmput+0x95/0x2d0 kernel/fork.c:1153 mmput+0x59/0x170 kernel/fork.c:1176 exit_mm kernel/exit.c:539 [inline] do_exit+0xbda/0x2a50 kernel/exit.c:850 do_group_exit+0x141/0x310 kernel/exit.c:985 __do_sys_exit_group kernel/exit.c:996 [inline] __se_sys_exit_group kernel/exit.c:994 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:994 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88811ee6ef00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88811ee6ef80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88811ee6f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88811ee6f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811ee6f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop0): __ext4_get_inode_loc:4437: comm syz-executor: Invalid inode table block 0 in block_group 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop0): __ext4_ext_dirty:182: inode #16: comm syz-executor: mark_inode_dirty error EXT4-fs error (device loop0): __ext4_get_inode_loc:4437: comm syz-executor: Invalid inode table block 0 in block_group 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop0): ext4_punch_hole:4229: inode #16: comm syz-executor: mark_inode_dirty error