================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 Read of size 4 at addr ffff888131cfb000 by task syz-executor.3/26148 CPU: 0 PID: 26148 Comm: syz-executor.3 Tainted: G W 5.15.149-syzkaller-00165-g85445b5a2107 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x2a3/0x630 fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x63b/0x7e0 fs/inode.c:1731 d_delete_notify include/linux/fsnotify.h:270 [inline] vfs_rmdir+0x359/0x470 fs/namei.c:4162 do_rmdir+0x3ab/0x630 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4384 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f49e28cd687 Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 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:00007fff7d349558 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f49e28cd687 RDX: 0000000000000200 RSI: 00007fff7d34a700 RDI: 00000000ffffff9c RBP: 00007f49e292a636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff7d34a700 R13: 00007f49e292a636 R14: 00000000001a4024 R15: 0000000000000007 The buggy address belongs to the page: page:ffffea0004c73ec0 refcount:2 mapcount:1 mapping:ffff888116133018 index:0x582 pfn:0x131cfb memcg:ffff88810adbc000 aops:shmem_aops ino:12db dentry name:"dev/zero" flags: 0x4000000000080016(referenced|uptodate|lru|swapbacked|zone=1) raw: 4000000000080016 ffffea00050c3d08 ffffea00050c3cc8 ffff888116133018 raw: 0000000000000582 0000000000000000 0000000200000000 ffff88810adbc000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x100cca(GFP_HIGHUSER_MOVABLE), pid 28242, ts 1706854121459, free_ts 1706785196099 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2604 prep_new_page+0x1b/0x110 mm/page_alloc.c:2610 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776 __alloc_pages_node include/linux/gfp.h:591 [inline] alloc_pages_node include/linux/gfp.h:605 [inline] alloc_pages include/linux/gfp.h:618 [inline] shmem_alloc_page mm/shmem.c:1587 [inline] shmem_alloc_and_acct_page+0x4bd/0xa80 mm/shmem.c:1612 shmem_getpage_gfp+0x1388/0x23c0 mm/shmem.c:1907 shmem_fault+0x1b8/0x6c0 mm/shmem.c:2119 __do_fault+0x273/0x300 mm/memory.c:4154 do_read_fault mm/memory.c:4515 [inline] do_fault mm/memory.c:4656 [inline] handle_pte_fault+0x167b/0x24d0 mm/memory.c:4871 do_handle_mm_fault+0x1ea9/0x23a0 mm/memory.c:5293 handle_mm_fault include/linux/mm.h:1836 [inline] faultin_page mm/gup.c:976 [inline] __get_user_pages+0x379/0xee0 mm/gup.c:1197 populate_vma_page_range mm/gup.c:1529 [inline] __mm_populate+0x38d/0x560 mm/gup.c:1638 mm_populate include/linux/mm.h:2693 [inline] vm_mmap_pgoff+0x271/0x450 mm/util.c:560 ksys_mmap_pgoff+0xed/0x1e0 mm/mmap.c:1636 __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+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1471 [inline] free_pcp_prepare mm/page_alloc.c:1543 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3533 free_unref_page_list+0x14b/0xa60 mm/page_alloc.c:3670 release_pages+0x1310/0x1370 mm/swap.c:1009 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xd0/0x180 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1510 [inline] zap_pmd_range mm/memory.c:1559 [inline] zap_pud_range mm/memory.c:1588 [inline] zap_p4d_range mm/memory.c:1609 [inline] unmap_page_range+0x1c70/0x1ed0 mm/memory.c:1630 unmap_single_vma mm/memory.c:1675 [inline] unmap_vmas+0x389/0x560 mm/memory.c:1707 exit_mmap+0x3e4/0x940 mm/mmap.c:3215 __mmput+0x95/0x310 kernel/fork.c:1179 mmput+0x5b/0x170 kernel/fork.c:1202 exit_mm kernel/exit.c:552 [inline] do_exit+0xb9c/0x2ca0 kernel/exit.c:865 do_group_exit+0x141/0x310 kernel/exit.c:1000 __do_sys_exit_group kernel/exit.c:1011 [inline] __se_sys_exit_group kernel/exit.c:1009 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1009 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff888131cfaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888131cfaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888131cfb000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888131cfb080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888131cfb100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================