loop6: detected capacity change from 0 to 1024 EXT4-fs: Ignoring removed oldalloc option EXT4-fs: Ignoring removed orlov option ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:953 Read of size 4 at addr ffff888142e9a018 by task syz.6.3495/12999 CPU: 0 PID: 12999 Comm: syz.6.3495 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_ext_binsearch fs/ext4/extents.c:837 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:953 ext4_ext_map_blocks+0x1dc/0x6060 fs/ext4/extents.c:4166 ext4_map_blocks+0x9cb/0x1b60 fs/ext4/inode.c:679 _ext4_get_block+0x1da/0x4e0 fs/ext4/inode.c:822 ext4_get_block+0x39/0x50 fs/ext4/inode.c:839 __block_write_begin_int+0x47a/0x1420 fs/buffer.c:2034 __block_write_begin fs/buffer.c:2084 [inline] block_page_mkwrite+0x281/0x300 fs/buffer.c:2558 ext4_page_mkwrite+0x4f2/0x1300 fs/ext4/inode.c:6316 do_page_mkwrite mm/memory.c:3036 [inline] wp_page_shared+0x505/0x8d0 mm/memory.c:3429 do_wp_page+0xde4/0xfc0 mm/memory.c:3581 handle_pte_fault mm/memory.c:5189 [inline] __handle_mm_fault mm/memory.c:5313 [inline] handle_mm_fault+0x10e4/0x2640 mm/memory.c:5453 do_user_addr_fault+0x63b/0x1050 arch/x86/mm/fault.c:1374 handle_page_fault arch/x86/mm/fault.c:1466 [inline] exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1522 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608 RIP: 0010:copy_user_enhanced_fast_string+0xa/0x40 arch/x86/lib/copy_user_64.S:166 Code: ff c9 75 f2 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 20 0f 01 cb 83 fa 40 72 38 89 d1 a4 31 c0 0f 01 ca c3 89 ca eb 0a 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90000a57be0 EFLAGS: 00050202 RAX: ffffffff82635601 RBX: 0000000000000841 RCX: 0000000000000781 RDX: 0000000000000841 RSI: ffff888112a600c0 RDI: 0000200000001000 RBP: ffffc90000a57c08 R08: dffffc0000000000 R09: ffffed102254c109 R10: 0000000000000000 R11: 0000000000000108 R12: 00007fffffffe7bf R13: ffffc90000a57ce0 R14: 0000200000000f40 R15: ffff888112a60000 copy_to_user include/linux/uaccess.h:169 [inline] do_getxattr+0x317/0x350 fs/xattr.c:704 getxattr fs/xattr.c:735 [inline] path_getxattr+0x24f/0x400 fs/xattr.c:751 __do_sys_lgetxattr fs/xattr.c:769 [inline] __se_sys_lgetxattr fs/xattr.c:766 [inline] __x64_sys_lgetxattr+0x9e/0xb0 fs/xattr.c:766 x64_sys_call+0x194/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:193 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fac34d8ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fac35ba4038 EFLAGS: 00000246 ORIG_RAX: 00000000000000c0 RAX: ffffffffffffffda RBX: 00007fac34fb5fa0 RCX: 00007fac34d8ebe9 RDX: 0000200000000f40 RSI: 0000200000000280 RDI: 0000200000000240 RBP: 00007fac34e11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffff92 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fac34fb6038 R14: 00007fac34fb5fa0 R15: 00007ffdedf58208 The buggy address belongs to the physical page: page:ffffea00050ba680 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x142e9a flags: 0x4000000000000000(zone=1) raw: 4000000000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 11045, tgid 11044 (syz.1.2837), ts 999124192807, free_ts 999460081441 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637 prep_new_page+0x1c/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4544 __alloc_pages+0x1c3/0x450 mm/page_alloc.c:5858 __folio_alloc+0x12/0x40 mm/page_alloc.c:5890 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] shmem_alloc_folio mm/shmem.c:1601 [inline] shmem_alloc_and_acct_folio+0x650/0x870 mm/shmem.c:1626 shmem_get_folio_gfp+0x119f/0x2230 mm/shmem.c:1955 shmem_fault+0x1ae/0x650 mm/shmem.c:2170 __do_fault mm/memory.c:4373 [inline] do_read_fault mm/memory.c:4739 [inline] do_fault+0x1a6f/0x1df0 mm/memory.c:4875 handle_pte_fault mm/memory.c:5171 [inline] __handle_mm_fault mm/memory.c:5313 [inline] handle_mm_fault+0x12fa/0x2640 mm/memory.c:5453 faultin_page mm/gup.c:1026 [inline] __get_user_pages+0x33d/0xd80 mm/gup.c:1250 populate_vma_page_range mm/gup.c:1607 [inline] __mm_populate+0x2e4/0x420 mm/gup.c:1721 mm_populate include/linux/mm.h:3083 [inline] vm_mmap_pgoff+0x268/0x3f0 mm/util.c:530 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1528 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x8fd/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3581 free_unref_page_list+0x112/0x8b0 mm/page_alloc.c:3730 release_pages+0xad1/0xb20 mm/swap.c:1043 __pagevec_release+0x71/0xe0 mm/swap.c:1063 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x51a/0x1470 mm/shmem.c:955 shmem_truncate_range mm/shmem.c:1071 [inline] shmem_evict_inode+0x242/0xa10 mm/shmem.c:1180 evict+0x493/0x890 fs/inode.c:705 iput_final fs/inode.c:1834 [inline] iput+0x620/0x670 fs/inode.c:1860 dentry_unlink_inode+0x33d/0x3f0 fs/dcache.c:405 __dentry_kill+0x460/0x670 fs/dcache.c:611 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1 dput+0x42/0x80 fs/dcache.c:918 __fput+0x5be/0x8f0 fs/file_table.c:328 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x1db/0x240 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0xa25/0x2650 kernel/exit.c:886 Memory state around the buggy address: ffff888142e99f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888142e99f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888142e9a000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888142e9a080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888142e9a100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop6): ext4_map_blocks:745: inode #15: block 4: comm syz.6.3495: lblock 4 mapped to illegal pblock 4 (length 1) EXT4-fs error (device loop6): ext4_map_blocks:635: inode #15: block 4: comm syz.6.3495: lblock 4 mapped to illegal pblock 4 (length 1) ---------------- Code disassembly (best guess): 0: ff c9 dec %ecx 2: 75 f2 jne 0xfffffff6 4: 89 d1 mov %edx,%ecx 6: c1 e9 03 shr $0x3,%ecx 9: 83 e2 07 and $0x7,%edx c: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) f: 89 d1 mov %edx,%ecx 11: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) 13: 31 c0 xor %eax,%eax 15: 0f 01 ca clac 18: c3 ret 19: 8d 0c ca lea (%rdx,%rcx,8),%ecx 1c: 89 ca mov %ecx,%edx 1e: eb 20 jmp 0x40 20: 0f 01 cb stac 23: 83 fa 40 cmp $0x40,%edx 26: 72 38 jb 0x60 28: 89 d1 mov %edx,%ecx * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: 31 c0 xor %eax,%eax 2e: 0f 01 ca clac 31: c3 ret 32: 89 ca mov %ecx,%edx 34: eb 0a jmp 0x40 36: 90 nop 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop