EXT4-fs error (device loop0): ext4_remove_blocks:2470: comm syz-executor.0: strange request: removal(2) 40-40 from 0:0 EXT4-fs (loop0): Remounting filesystem read-only ================================================================== BUG: KASAN: out-of-bounds in ext4_ext_rm_leaf fs/ext4/extents.c:2736 [inline] BUG: KASAN: out-of-bounds in ext4_ext_remove_space+0x2569/0x4ef0 fs/ext4/extents.c:2958 Read of size 18446744073709551508 at addr ffff888126154078 by task syz-executor.0/377 CPU: 0 PID: 377 Comm: syz-executor.0 Not tainted 6.5.0-syzkaller-09276-g99d99825fc07 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x155/0x1c0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x15d/0x540 mm/kasan/report.c:475 kasan_report+0x16d/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x238/0x2b0 mm/kasan/generic.c:187 __asan_memmove+0x31/0x70 mm/kasan/shadow.c:94 ext4_ext_rm_leaf fs/ext4/extents.c:2736 [inline] ext4_ext_remove_space+0x2569/0x4ef0 fs/ext4/extents.c:2958 ext4_punch_hole+0x77f/0xbc0 fs/ext4/inode.c:4011 ext4_fallocate+0x310/0x1d90 fs/ext4/extents.c:4706 vfs_fallocate+0x49c/0x580 fs/open.c:324 do_vfs_ioctl+0x21fe/0x2a50 fs/ioctl.c:850 __do_sys_ioctl fs/ioctl.c:869 [inline] __se_sys_ioctl+0x99/0x190 fs/ioctl.c:857 __x64_sys_ioctl+0x7f/0x90 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f517b27cae9 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:00007f517bffd0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f517b39c050 RCX: 00007f517b27cae9 RDX: 0000000020000080 RSI: 000000004030582b RDI: 0000000000000004 RBP: 00007f517b2c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f517b39c050 R15: 00007fff87c08c18 The buggy address belongs to the physical page: page:ffffea0004985500 refcount:2 mapcount:0 mapping:ffff88810acadce0 index:0x2b pfn:0x126154 memcg:ffff888123370000 aops:def_blk_aops ino:700000 flags: 0x400000000000812c(referenced|uptodate|lru|active|private|zone=1) page_type: 0xffffffff() raw: 400000000000812c ffffea000498c148 ffff888123396030 ffff88810acadce0 raw: 000000000000002b ffff888124843f18 00000002ffffffff ffff888123370000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 372, tgid 371 (syz-executor.0), ts 43371184930, free_ts 43251755537 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x223/0x230 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x3489/0x3550 mm/page_alloc.c:3183 __alloc_pages+0x3e7/0x890 mm/page_alloc.c:4439 __folio_alloc+0x19/0x40 mm/page_alloc.c:4471 __folio_alloc_node include/linux/gfp.h:246 [inline] folio_alloc include/linux/gfp.h:275 [inline] filemap_alloc_folio include/linux/pagemap.h:515 [inline] __filemap_get_folio+0x382/0x6a0 mm/filemap.c:1939 grow_dev_page fs/buffer.c:1058 [inline] grow_buffers fs/buffer.c:1118 [inline] __getblk_slow fs/buffer.c:1145 [inline] __getblk_gfp+0x20a/0x5e0 fs/buffer.c:1439 sb_getblk_gfp include/linux/buffer_head.h:348 [inline] ext4_ext_grow_indepth fs/ext4/extents.c:1334 [inline] ext4_ext_create_new_leaf fs/ext4/extents.c:1435 [inline] ext4_ext_insert_extent+0xf7e/0x4b20 fs/ext4/extents.c:2102 ext4_ext_map_blocks+0x2030/0x7260 fs/ext4/extents.c:4306 ext4_map_blocks+0xa29/0x1cb0 fs/ext4/inode.c:621 _ext4_get_block+0x238/0x6a0 fs/ext4/inode.c:763 ext4_get_block+0x3d/0x50 fs/ext4/inode.c:780 ext4_block_write_begin+0x4a2/0xfd0 fs/ext4/inode.c:1043 ext4_write_begin+0x5c5/0xf00 ext4_da_write_begin+0x2fc/0x8f0 fs/ext4/inode.c:2865 generic_perform_write+0x312/0x610 mm/filemap.c:3945 ext4_buffered_write_iter+0x31f/0x5e0 fs/ext4/file.c:299 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x480/0x6c0 mm/page_alloc.c:2312 free_unref_page_list+0xfb/0x790 mm/page_alloc.c:2451 release_pages+0xe23/0xe80 mm/swap.c:1042 __folio_batch_release+0x88/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x407/0xcc0 mm/truncate.c:371 truncate_pagecache_range+0xa5/0xc0 mm/truncate.c:855 ext4_punch_hole+0x488/0xbc0 fs/ext4/inode.c:3977 ext4_fallocate+0x310/0x1d90 fs/ext4/extents.c:4706 vfs_fallocate+0x49c/0x580 fs/open.c:324 do_vfs_ioctl+0x21fe/0x2a50 fs/ioctl.c:850 __do_sys_ioctl fs/ioctl.c:869 [inline] __se_sys_ioctl+0x99/0x190 fs/ioctl.c:857 __x64_sys_ioctl+0x7f/0x90 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888126153f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888126153f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888126154000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888126154080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888126154100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================