BUG: KASAN: use-after-free in xattr_find_entry fs/ext4/xattr.c:294 [inline] BUG: KASAN: use-after-free in ext4_xattr_ibody_get+0x606/0x670 fs/ext4/xattr.c:601 Read of size 4 at addr ffff88812ae81004 by task syz.3.20/411 CPU: 1 PID: 411 Comm: syz.3.20 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 xattr_find_entry fs/ext4/xattr.c:294 [inline] ext4_xattr_ibody_get+0x606/0x670 fs/ext4/xattr.c:601 ext4_xattr_get+0x116/0x830 fs/ext4/xattr.c:655 ext4_get_acl+0x85/0x6c0 fs/ext4/acl.c:165 get_acl+0x161/0x270 fs/posix_acl.c:153 posix_acl_chmod+0xe9/0x250 fs/posix_acl.c:602 ext4_setattr+0xb6b/0x1b10 fs/ext4/inode.c:5672 notify_change+0xc30/0xf40 fs/attr.c:505 chmod_common+0x21a/0x3c0 fs/open.c:583 do_fchmodat+0xd4/0x1a0 fs/open.c:622 __do_sys_chmod fs/open.c:640 [inline] __se_sys_chmod fs/open.c:638 [inline] __x64_sys_chmod+0x60/0x70 fs/open.c:638 x64_sys_call+0xad/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:91 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5df081ae59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5df067d028 EFLAGS: 00000246 ORIG_RAX: 000000000000005a RAX: ffffffffffffffda RBX: 00007f5df0a93fa0 RCX: 00007f5df081ae59 RDX: 0000000000000000 RSI: 000000000000023f RDI: 0000200000000180 RBP: 00007f5df08b0e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5df0a94038 R14: 00007f5df0a93fa0 R15: 00007ffceaedcc38 The buggy address belongs to the page: page:ffffea0004aba040 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12ae81 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004aba088 ffffea0004ab98c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 410, ts 28971945620, free_ts 29020639512 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] __page_cache_alloc include/linux/pagemap.h:305 [inline] page_cache_ra_unbounded+0x2bc/0x960 mm/readahead.c:227 do_page_cache_ra+0xf2/0x110 mm/readahead.c:280 do_sync_mmap_readahead+0x6ea/0xaf0 mm/filemap.c:3027 filemap_fault+0x7a2/0x1cc0 mm/filemap.c:3175 __do_fault+0x25f/0x2f0 mm/memory.c:4195 do_read_fault mm/memory.c:4568 [inline] do_fault mm/memory.c:4709 [inline] handle_pte_fault+0x1bc0/0x2770 mm/memory.c:4923 __handle_mm_fault mm/memory.c:-1 [inline] do_handle_mm_fault+0x1b3b/0x1e30 mm/memory.c:5345 handle_mm_fault include/linux/mm.h:1847 [inline] faultin_page mm/gup.c:976 [inline] __get_user_pages+0x80e/0x10c0 mm/gup.c:1197 populate_vma_page_range mm/gup.c:1529 [inline] __mm_populate+0x324/0x470 mm/gup.c:1638 mm_populate include/linux/mm.h:2704 [inline] vm_mmap_pgoff+0x245/0x410 mm/util.c:560 ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1647 __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 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1474 [inline] free_pcp_prepare mm/page_alloc.c:1546 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536 free_unref_page_list+0x138/0x9e0 mm/page_alloc.c:3673 release_pages+0x1264/0x12c0 mm/swap.c:1015 __pagevec_release+0x71/0xe0 mm/swap.c:1035 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x4b5/0x6c0 mm/truncate.c:517 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:541 invalidate_bdev+0xa6/0x150 block/bdev.c:91 ext4_put_super+0x6ce/0xa60 fs/ext4/super.c:1245 generic_shutdown_super+0x151/0x330 fs/super.c:475 kill_block_super+0x7f/0xf0 fs/super.c:1427 deactivate_locked_super+0xa0/0x100 fs/super.c:335 deactivate_super+0xaf/0xe0 fs/super.c:366 cleanup_mnt+0x44f/0x500 fs/namespace.c:1149 __cleanup_mnt+0x19/0x20 fs/namespace.c:1156 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 Memory state around the buggy address: ffff88812ae80f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812ae80f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812ae81000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812ae81080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812ae81100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================