EXT4-fs (loop3): 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+0x247e/0x4d70 fs/ext4/extents.c:2958 Read of size 18446744073709551496 at addr ffff88806c3ca084 by task syz-executor.3/5917 CPU: 1 PID: 5917 Comm: syz-executor.3 Not tainted 6.7.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x15f/0x540 mm/kasan/report.c:475 kasan_report+0x13e/0x170 mm/kasan/report.c:588 kasan_check_range+0x27a/0x290 mm/kasan/generic.c:187 __asan_memmove+0x25/0x60 mm/kasan/shadow.c:94 ext4_ext_rm_leaf fs/ext4/extents.c:2736 [inline] ext4_ext_remove_space+0x247e/0x4d70 fs/ext4/extents.c:2958 ext4_punch_hole+0x77c/0xbb0 fs/ext4/inode.c:4019 ext4_fallocate+0x30d/0x1f40 fs/ext4/extents.c:4707 vfs_fallocate+0x54d/0x6b0 fs/open.c:324 do_vfs_ioctl+0x225c/0x2ac0 fs/ioctl.c:850 __do_sys_ioctl fs/ioctl.c:869 [inline] __se_sys_ioctl+0x81/0x170 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fce48c7cce9 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:00007fce47fbc0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fce48d9c120 RCX: 00007fce48c7cce9 RDX: 0000000020000080 RSI: 000000004030582b RDI: 0000000000000004 RBP: 00007fce48cc947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fce48d9c120 R15: 00007ffcebabcc08 The buggy address belongs to the physical page: page:ffffea0001b0f280 refcount:2 mapcount:0 mapping:ffff888148c8eff8 index:0x27 pfn:0x6c3ca memcg:ffff88807e71a000 aops:def_blk_aops ino:700003 flags: 0xfff5800000822c(referenced|uptodate|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff5800000822c ffffea00019c8ac8 ffffea0001b6c4c8 ffff888148c8eff8 raw: 0000000000000027 ffff888063acee80 00000002ffffffff ffff88807e71a000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140c48(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 5888, tgid 5887 (syz-executor.3), ts 99938146037, free_ts 99920649090 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x3376/0x3500 mm/page_alloc.c:3312 __alloc_pages+0x251/0x660 mm/page_alloc.c:4568 alloc_pages_mpol+0x3da/0x640 mm/mempolicy.c:2133 alloc_pages mm/mempolicy.c:2204 [inline] folio_alloc+0x126/0x320 mm/mempolicy.c:2211 filemap_alloc_folio+0xda/0x4f0 mm/filemap.c:974 __filemap_get_folio+0x429/0xb90 mm/filemap.c:1918 grow_dev_page fs/buffer.c:1041 [inline] grow_buffers fs/buffer.c:1106 [inline] __getblk_slow fs/buffer.c:1133 [inline] bdev_getblk+0x23f/0x6d0 fs/buffer.c:1429 sb_getblk_gfp include/linux/buffer_head.h:370 [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+0xfdf/0x4ef0 fs/ext4/extents.c:2102 ext4_ext_map_blocks+0x2078/0x7140 fs/ext4/extents.c:4306 ext4_map_blocks+0xa2b/0x1cb0 fs/ext4/inode.c:621 _ext4_get_block+0x234/0x6a0 fs/ext4/inode.c:763 ext4_block_write_begin+0x533/0x1830 fs/ext4/inode.c:1053 ext4_write_begin+0x615/0x10a0 ext4_da_write_begin+0x2fc/0xa40 fs/ext4/inode.c:2875 generic_perform_write+0x317/0x630 mm/filemap.c:3927 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x915/0xa30 mm/page_alloc.c:2347 free_unref_page_list+0x58e/0x830 mm/page_alloc.c:2533 release_pages+0x26e2/0x2a00 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x348/0x4d0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd0/0x1f0 mm/mmu_gather.c:392 unmap_region+0x2fc/0x350 mm/mmap.c:2341 do_vmi_align_munmap+0x121a/0x1840 mm/mmap.c:2657 do_vmi_munmap+0x249/0x2d0 mm/mmap.c:2725 __vm_munmap+0x22c/0x440 mm/mmap.c:3012 __do_sys_munmap mm/mmap.c:3029 [inline] __se_sys_munmap mm/mmap.c:3026 [inline] __x64_sys_munmap+0x5c/0x70 mm/mmap.c:3026 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88806c3c9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806c3ca000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806c3ca080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806c3ca100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806c3ca180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================