KASAN: use-after-free Read in xattr_find_entry

Status: upstream: reported C repro on 2026/06/22 02:11
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+8dc2a17ad14a884441dd@syzkaller.appspotmail.com
First crash: 56d, last: 3d07h
Bug presence (2)
Date Name Commit Repro Result
2026/07/21 lts (merge base) 4fd016be1e49 C [report] lost connection to test machine
2026/07/21 upstream (ToT) 248951ddc14d C [report] lost connection to test machine
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in xattr_find_entry ext4 19 2 299d 296d 0/29 auto-obsoleted due to no activity on 2026/01/20 09:16
upstream KASAN: use-after-free Read in xattr_find_entry (2) prio:high ext4 19 syz, C error error 3 165d 175d 0/29 upstream: reported C repro on 2026/02/23 00:12
Last patch testing requests (5)
Created Duration User Patch Repo Result
2026/08/13 02:13 13m retest repro android14-6.1 error job log
2026/08/13 02:13 13m retest repro android14-6.1 error job log
2026/08/13 02:13 14m retest repro android14-6.1 error job log
2026/08/13 02:13 16m retest repro android14-6.1 error job log
2026/07/13 15:06 15m retest repro android14-6.1 log

Sample crash report:
BUG: KASAN: use-after-free in xattr_find_entry+0x2f5/0x300 fs/ext4/xattr.c:294
Read of size 4 at addr ffff888125796004 by task syz-executor575/309

CPU: 0 PID: 309 Comm: syz-executor575 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
 xattr_find_entry+0x2f5/0x300 fs/ext4/xattr.c:294
 ext4_xattr_ibody_get+0x245/0x4d0 fs/ext4/xattr.c:601
 ext4_xattr_get+0x122/0x650 fs/ext4/xattr.c:655
 ext4_get_acl+0x85/0x6c0 fs/ext4/acl.c:165
 get_acl+0x16f/0x280 fs/posix_acl.c:153
 posix_acl_chmod+0xe9/0x260 fs/posix_acl.c:602
 ext4_setattr+0xd4e/0x1c80 fs/ext4/inode.c:5693
 notify_change+0xd33/0x1030 fs/attr.c:499
 chmod_common+0x21a/0x3c0 fs/open.c:607
 do_fchmodat+0xd4/0x1a0 fs/open.c:646
 __do_sys_fchmodat fs/open.c:659 [inline]
 __se_sys_fchmodat fs/open.c:656 [inline]
 __x64_sys_fchmodat+0x7b/0x90 fs/open.c:656
 x64_sys_call+0x752/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:269
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1cd640db39
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1cd63e0168 EFLAGS: 00000246 ORIG_RAX: 000000000000010c
RAX: ffffffffffffffda RBX: 00007f1cd64b5e28 RCX: 00007f1cd640db39
RDX: 00000000ffffff50 RSI: 0000200000000300 RDI: 00000000ffffff9c
RBP: 00007f1cd64b5e20 R08: 00007f1cd63e0cdc R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1cd64b5e2c
R13: 0000000000000006 R14: 00007ffccc0b7d10 R15: 00007ffccc0b7df8
 </TASK>

The buggy address belongs to the physical page:
page:ffffea000495e580 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x125796
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea000495e688 ffffea000495eb08 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 307, tgid 307 (udevd), ts 24597311849, free_ts 24597715175
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930
 __folio_alloc+0x12/0x40 mm/page_alloc.c:5963
 __folio_alloc_node include/linux/gfp.h:245 [inline]
 folio_alloc include/linux/gfp.h:274 [inline]
 shmem_alloc_folio mm/shmem.c:1597 [inline]
 shmem_alloc_and_acct_folio+0x6dd/0x8c0 mm/shmem.c:1622
 shmem_get_folio_gfp+0xd6d/0x20f0 mm/shmem.c:1951
 shmem_get_folio mm/shmem.c:2082 [inline]
 shmem_write_begin+0xea/0x2c0 mm/shmem.c:2567
 generic_perform_write+0x32d/0x740 mm/filemap.c:3915
 __generic_file_write_iter+0x17a/0x230 mm/filemap.c:4014
 generic_file_write_iter+0xae/0x310 mm/filemap.c:4043
 call_write_iter include/linux/fs.h:2282 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x5ef/0xd00 fs/read_write.c:584
 ksys_write+0x14a/0x260 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1580 [inline]
 free_pcp_prepare mm/page_alloc.c:1654 [inline]
 free_unref_page_prepare+0x80c/0x820 mm/page_alloc.c:3621
 free_unref_page_list+0x117/0x8d0 mm/page_alloc.c:3772
 release_pages+0xc7e/0xce0 mm/swap.c:1053
 __pagevec_release+0x71/0xe0 mm/swap.c:1073
 pagevec_release include/linux/pagevec.h:71 [inline]
 folio_batch_release include/linux/pagevec.h:135 [inline]
 shmem_undo_range+0x564/0x14e0 mm/shmem.c:951
 shmem_truncate_range mm/shmem.c:1067 [inline]
 shmem_evict_inode+0x21f/0x9c0 mm/shmem.c:1176
 evict+0x4c4/0x8c0 fs/inode.c:709
 iput_final fs/inode.c:1845 [inline]
 iput+0x633/0x690 fs/inode.c:1871
 dentry_unlink_inode+0x346/0x3f0 fs/dcache.c:405
 __dentry_kill+0x46c/0x680 fs/dcache.c:611
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:918
 do_renameat2+0xa33/0xfc0 fs/namei.c:5036
 __do_sys_rename fs/namei.c:5080 [inline]
 __se_sys_rename fs/namei.c:5078 [inline]
 __x64_sys_rename+0x86/0x90 fs/namei.c:5078
 x64_sys_call+0x300/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:83
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76

Memory state around the buggy address:
 ffff888125795f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888125795f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888125796000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff888125796080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888125796100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
EXT4-fs error (device loop0): xattr_find_entry:297: inode #12: comm syz-executor575: corrupted xattr entries
EXT4-fs (loop0): Remounting filesystem read-only

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/14 08:38 android14-6.1 92668decd5e0 b13552fe .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (clean fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/08/14 08:08 android14-6.1 92668decd5e0 b13552fe .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (clean fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/07/20 06:03 android14-6.1 c7e15f0bdc49 72524a66 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/07/20 05:20 android14-6.1 c7e15f0bdc49 72524a66 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/07/20 04:39 android14-6.1 c7e15f0bdc49 72524a66 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/07/20 04:10 android14-6.1 c7e15f0bdc49 72524a66 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
2026/06/22 02:09 android14-6.1 72813af230c7 43bfcdb0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: use-after-free Read in xattr_find_entry
* Struck through repros no longer work on HEAD.