EXT4-fs error (device loop3) in ext4_mb_clear_bb:6184: Corrupt filesystem ================================================================== BUG: KASAN: out-of-bounds in ext4_ext_rm_leaf fs/ext4/extents.c:2711 [inline] BUG: KASAN: out-of-bounds in ext4_ext_remove_space+0x1f85/0x3bf0 fs/ext4/extents.c:2933 Read of size 18446744073709551544 at addr ffff88815d86f054 by task syz-executor.3/7222 CPU: 0 PID: 7222 Comm: syz-executor.3 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8e/0xdd lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memmove+0x20/0x60 mm/kasan/shadow.c:54 ext4_ext_rm_leaf fs/ext4/extents.c:2711 [inline] ext4_ext_remove_space+0x1f85/0x3bf0 fs/ext4/extents.c:2933 ext4_punch_hole+0x9a5/0x1070 fs/ext4/inode.c:4088 ext4_fallocate+0xdb1/0x3730 fs/ext4/extents.c:4740 vfs_fallocate+0x492/0xc30 fs/open.c:308 ioctl_preallocate+0x18e/0x200 fs/ioctl.c:294 file_ioctl fs/ioctl.c:337 [inline] do_vfs_ioctl+0x1073/0x14e0 fs/ioctl.c:853 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x108/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f2fe5653e69 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:00007f2fe49b30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2fe5782050 RCX: 00007f2fe5653e69 RDX: 0000000020000080 RSI: 000000004030582b RDI: 0000000000000004 RBP: 00007f2fe56a047a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f2fe5782050 R15: 00007fffd4184418 The buggy address belongs to the page: page:ffffea0005761bc0 refcount:2 mapcount:0 mapping:ffff888100424a20 index:0x11 pfn:0x15d86f memcg:ffff888111db8000 aops:def_blk_aops ino:700003 flags: 0x100000000002036(referenced|uptodate|lru|active|private|node=0|zone=2) raw: 0100000000002036 ffffea0005f3a548 ffff888102dbd030 ffff888100424a20 raw: 0000000000000011 ffff88816d73c1d0 00000002ffffffff ffff888111db8000 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 7208, ts 174061501401, free_ts 173162708991 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x13ed/0x3430 mm/page_alloc.c:4159 __alloc_pages+0x1b2/0x420 mm/page_alloc.c:5423 alloc_pages+0x16f/0x3d0 mm/mempolicy.c:2185 __page_cache_alloc mm/filemap.c:1022 [inline] __page_cache_alloc+0x2c8/0x320 mm/filemap.c:1007 pagecache_get_page+0x39f/0x18d0 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+0x1f9/0xb10 fs/buffer.c:1041 __getblk_gfp+0x58/0x60 fs/buffer.c:1336 sb_getblk_gfp include/linux/buffer_head.h:368 [inline] ext4_ext_grow_indepth fs/ext4/extents.c:1328 [inline] ext4_ext_create_new_leaf fs/ext4/extents.c:1429 [inline] ext4_ext_insert_extent+0x1240/0x3ef0 fs/ext4/extents.c:2099 ext4_ext_map_blocks+0x1254/0x56b0 fs/ext4/extents.c:4337 ext4_map_blocks+0x704/0x16e0 fs/ext4/inode.c:645 _ext4_get_block+0x21a/0x570 fs/ext4/inode.c:792 ext4_block_write_begin+0x4a3/0xfb0 fs/ext4/inode.c:1077 ext4_write_begin+0x501/0x1450 fs/ext4/inode.c:1208 ext4_da_write_begin+0x5aa/0x980 fs/ext4/inode.c:2963 generic_perform_write+0x211/0x500 mm/filemap.c:3785 ext4_buffered_write_iter+0x232/0x4d0 fs/ext4/file.c:268 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+0x34e/0x820 mm/page_alloc.c:1391 free_unref_page_prepare mm/page_alloc.c:3317 [inline] free_unref_page_list+0x16f/0xbb0 mm/page_alloc.c:3433 release_pages+0x7da/0x1f70 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+0x165/0x8c0 mm/mmu_gather.c:338 unmap_region+0x304/0x3f0 mm/mmap.c:2668 __do_munmap+0x5f7/0x1200 mm/mmap.c:2899 __vm_munmap+0x104/0x220 mm/mmap.c:2922 __do_sys_munmap mm/mmap.c:2948 [inline] __se_sys_munmap mm/mmap.c:2944 [inline] __x64_sys_munmap+0x62/0x80 mm/mmap.c:2944 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88815d86ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88815d86ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88815d86f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88815d86f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88815d86f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================