================================================================== 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+0x2150/0x4390 fs/ext4/extents.c:2937 Read of size 18446744073709551556 at addr ffff88805ef3d048 by task syz-executor.4/7324 CPU: 0 PID: 7324 Comm: syz-executor.4 Not tainted 5.15.183-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/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+0x2150/0x4390 fs/ext4/extents.c:2937 ext4_punch_hole+0x7c6/0xc20 fs/ext4/inode.c:4100 ext4_fallocate+0x2a4/0x1ee0 fs/ext4/extents.c:4763 vfs_fallocate+0x587/0x6f0 fs/open.c:308 ioctl_preallocate fs/ioctl.c:294 [inline] file_ioctl fs/ioctl.c:-1 [inline] do_vfs_ioctl+0x1b70/0x1de0 fs/ioctl.c:853 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:860 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 RIP: 0033:0x7f222db15e69 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:00007f222ce750c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f222dc44050 RCX: 00007f222db15e69 RDX: 0000000020000080 RSI: 000000004030582b RDI: 0000000000000004 RBP: 00007f222db6247a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f222dc44050 R15: 00007ffcc3c07068 The buggy address belongs to the page: page:ffffea00017bcf40 refcount:2 mapcount:0 mapping:ffff88801ce508b0 index:0x21 pfn:0x5ef3d memcg:ffff88807ceec000 aops:def_blk_aops ino:700004 flags: 0xfff00000002036(referenced|uptodate|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002036 ffffea0000890808 ffff88801e9d4030 ffff88801ce508b0 raw: 0000000000000021 ffff888070eadbc8 00000002ffffffff ffff88807ceec000 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 7314, ts 201300934991, free_ts 201268164020 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 __page_cache_alloc+0xd2/0x3f0 mm/filemap.c:1022 pagecache_get_page+0x986/0xef0 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+0x249/0xb70 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+0x110f/0x47e0 fs/ext4/extents.c:2102 ext4_ext_map_blocks+0x15c1/0x64e0 fs/ext4/extents.c:4360 ext4_map_blocks+0x981/0x1b30 fs/ext4/inode.c:673 _ext4_get_block+0x1d7/0x4e0 fs/ext4/inode.c:816 ext4_block_write_begin+0x60f/0x1210 fs/ext4/inode.c:1101 ext4_write_begin+0x6c2/0x15c0 fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x435/0xb30 fs/ext4/inode.c:2975 generic_perform_write+0x2aa/0x530 mm/filemap.c:3785 ext4_buffered_write_iter+0x25f/0x3b0 fs/ext4/file.c:268 ext4_file_write_iter+0x773/0x17b0 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x712/0xd00 fs/read_write.c:594 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+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x2f3/0xef0 mm/truncate.c:329 ext4_punch_hole+0x49c/0xc20 fs/ext4/inode.c:4062 ext4_fallocate+0x2a4/0x1ee0 fs/ext4/extents.c:4763 vfs_fallocate+0x587/0x6f0 fs/open.c:308 ioctl_preallocate fs/ioctl.c:294 [inline] file_ioctl fs/ioctl.c:-1 [inline] do_vfs_ioctl+0x1b70/0x1de0 fs/ioctl.c:853 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:860 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 Memory state around the buggy address: ffff88805ef3cf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805ef3cf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805ef3d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88805ef3d080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805ef3d100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================