EXT4-fs error (device loop3): ext4_free_blocks:6223: comm syz.3.602: Freeing blocks not in datazone - block = 41, count = 1 EXT4-fs (loop3): Remounting filesystem read-only ================================================================== BUG: KASAN: out-of-bounds in ext4_ext_rm_leaf fs/ext4/extents.c:2715 [inline] BUG: KASAN: out-of-bounds in ext4_ext_remove_space+0x1e04/0x4db0 fs/ext4/extents.c:2937 Read of size 18446744073709551604 at addr ffff888071ce3018 by task syz.3.602/5699 CPU: 0 PID: 5699 Comm: syz.3.602 Not tainted 5.15.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189 memmove+0x25/0x60 mm/kasan/shadow.c:54 ext4_ext_rm_leaf fs/ext4/extents.c:2715 [inline] ext4_ext_remove_space+0x1e04/0x4db0 fs/ext4/extents.c:2937 ext4_punch_hole+0x7c0/0xc10 fs/ext4/inode.c:4099 ext4_fallocate+0x30a/0x20f0 fs/ext4/extents.c:4763 vfs_fallocate+0x54a/0x6b0 fs/open.c:308 ksys_fallocate fs/open.c:331 [inline] __do_sys_fallocate fs/open.c:339 [inline] __se_sys_fallocate fs/open.c:337 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f184efceff9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f184d426038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f184f187058 RCX: 00007f184efceff9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007f184f041296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f184f187058 R15: 00007ffe4abcae88 The buggy address belongs to the page: page:ffffea0001c738c0 refcount:2 mapcount:0 mapping:ffff8880174f7270 index:0x38 pfn:0x71ce3 memcg:ffff88807c154000 aops:def_blk_aops ino:700003 flags: 0xfff00000002036(referenced|uptodate|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002036 ffffea0001920988 ffffea00017a3bc8 ffff8880174f7270 raw: 0000000000000038 ffff8880622211d0 00000002ffffffff ffff88807c154000 page dumped because: kasan: bad access detected 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 5671, ts 245204771648, free_ts 244963939394 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 __page_cache_alloc+0xd4/0x4a0 mm/filemap.c:1022 pagecache_get_page+0xa91/0x1010 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x22a/0xaf0 fs/buffer.c:1336 sb_getblk_gfp include/linux/buffer_head.h:368 [inline] ext4_ext_grow_indepth fs/ext4/extents.c:1330 [inline] ext4_ext_create_new_leaf fs/ext4/extents.c:1431 [inline] ext4_ext_insert_extent+0xfe8/0x4e50 fs/ext4/extents.c:2102 ext4_ext_map_blocks+0x1d5b/0x7630 fs/ext4/extents.c:4360 ext4_map_blocks+0xa66/0x1c70 fs/ext4/inode.c:672 ext4_alloc_file_blocks+0x3db/0xce0 fs/ext4/extents.c:4526 ext4_fallocate+0xcf9/0x20f0 fs/ext4/extents.c:4813 vfs_fallocate+0x54a/0x6b0 fs/open.c:308 ksys_fallocate fs/open.c:331 [inline] __do_sys_fallocate fs/open.c:339 [inline] __se_sys_fallocate fs/open.c:337 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 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:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 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:338 exit_mmap+0x3cd/0x670 mm/mmap.c:3188 __mmput+0x112/0x3b0 kernel/fork.c:1126 exit_mm+0x688/0x7f0 kernel/exit.c:550 do_exit+0x626/0x2480 kernel/exit.c:861 do_group_exit+0x144/0x310 kernel/exit.c:996 __do_sys_exit_group kernel/exit.c:1007 [inline] __se_sys_exit_group kernel/exit.c:1005 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1005 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888071ce2f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071ce2f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071ce3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888071ce3080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071ce3100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================