================================================================== BUG: KASAN: out-of-bounds in ext4_ext_binsearch fs/ext4/extents.c:837 [inline] BUG: KASAN: out-of-bounds in ext4_find_extent+0xbc8/0xde0 fs/ext4/extents.c:953 Read of size 4 at addr ffff88807279c070 by task syz-executor.0/5471 CPU: 0 PID: 5471 Comm: syz-executor.0 Not tainted 6.5.0-syzkaller-11075-g92901222f83d #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+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 ext4_ext_binsearch fs/ext4/extents.c:837 [inline] ext4_find_extent+0xbc8/0xde0 fs/ext4/extents.c:953 ext4_ext_map_blocks+0x2cb/0x7150 fs/ext4/extents.c:4101 ext4_map_blocks+0xa2f/0x1cb0 fs/ext4/inode.c:621 _ext4_get_block+0x238/0x6a0 fs/ext4/inode.c:763 __block_write_begin_int+0x555/0x1a40 fs/buffer.c:2107 block_page_mkwrite+0x2a5/0x4b0 fs/buffer.c:2625 ext4_page_mkwrite+0x500/0x1240 fs/ext4/inode.c:6150 do_page_mkwrite+0x197/0x470 mm/memory.c:2931 wp_page_shared mm/memory.c:3291 [inline] do_wp_page+0xf3d/0x4010 mm/memory.c:3376 handle_pte_fault mm/memory.c:4994 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x1b36/0x6200 mm/memory.c:5284 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0033:0x7f1151e5dd07 Code: ce 48 ff c7 48 01 fe 48 8d 54 11 80 0f 1f 80 00 00 00 00 c5 fe 6f 0e c5 fe 6f 56 20 c5 fe 6f 5e 40 c5 fe 6f 66 60 48 83 ee 80 fd 7f 0f c5 fd 7f 57 20 c5 fd 7f 5f 40 c5 fd 7f 67 60 48 83 ef RSP: 002b:00007fff03a67128 EFLAGS: 00010203 RAX: 0000000020003600 RBX: 00007fff03a67238 RCX: 0000000020003600 RDX: 00000000200036a9 RSI: 00007f1151a207b0 RDI: 0000000020003620 RBP: 0000000000000001 R08: 0000000000000000 R09: 00007f1151f9bf8c R10: 00007fff03a67260 R11: 0000000000000246 R12: 00007f1151a206f0 R13: fffffffffffffffe R14: 00007f1151a00000 R15: 00007f1151a206f8 The buggy address belongs to the physical page: page:ffffea0001c9e700 refcount:2 mapcount:2 mapping:0000000000000000 index:0x7fffffffc pfn:0x7279c memcg:ffff888015e5a000 anon flags: 0xfff00000080028(uptodate|lru|swapbacked|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x1() raw: 00fff00000080028 ffffea0001c9e6c8 ffffea0001c9e748 ffff88807c726551 raw: 00000007fffffffc 0000000000000000 0000000200000001 ffff888015e5a000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 5480, tgid 5480 (dhcpcd-run-hook), ts 76079123948, free_ts 72889010100 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31ec/0x3370 mm/page_alloc.c:3183 __alloc_pages+0x255/0x670 mm/page_alloc.c:4439 __folio_alloc+0x13/0x30 mm/page_alloc.c:4471 vma_alloc_folio+0x48a/0x9a0 mm/mempolicy.c:2259 do_anonymous_page mm/memory.c:4110 [inline] do_pte_missing mm/memory.c:3667 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x2359/0x6200 mm/memory.c:5284 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2ac/0x860 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 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+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x45d/0x11a0 mm/truncate.c:371 ext4_evict_inode+0x21c/0xf20 fs/ext4/inode.c:193 evict+0x2a4/0x620 fs/inode.c:664 do_unlinkat+0x50c/0x950 fs/namei.c:4405 __do_sys_unlink fs/namei.c:4446 [inline] __se_sys_unlink fs/namei.c:4444 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4444 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807279bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807279bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807279c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807279c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807279c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================