[Android 5.10] KASAN: use-after-free Read in ext4_listxattr

0 views
Skip to first unread message

syzbot

unread,
Jun 4, 2026, 4:13:26 PM (2 days ago) Jun 4
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4a079a5d30eb Merge android13-5.10 into android13-5.10-lts
git tree: android13-5.10-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=17bf5173980000
kernel config: https://syzkaller.appspot.com/x/.config?x=24485137faf0cce5
dashboard link: https://syzkaller.appspot.com/bug?extid=e12ea4689cb4be2c2709
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1523db7e580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=130baa56580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7e3d3825c287/disk-4a079a5d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a12d3498c579/vmlinux-4a079a5d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/312e433c42ad/bzImage-4a079a5d.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/f3696ca81d23/mount_0.gz
fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=1123db7e580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e12ea4...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in ext4_xattr_list_entries fs/ext4/xattr.c:670 [inline]
BUG: KASAN: use-after-free in ext4_xattr_ibody_list fs/ext4/xattr.c:740 [inline]
BUG: KASAN: use-after-free in ext4_listxattr+0x4a6/0xc50 fs/ext4/xattr.c:765
Read of size 4 at addr ffff88812cf66090 by task syz.6.22/431

CPU: 1 PID: 431 Comm: syz.6.22 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0xe2/0x130 mm/kasan/report.c:452
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
ext4_xattr_list_entries fs/ext4/xattr.c:670 [inline]
ext4_xattr_ibody_list fs/ext4/xattr.c:740 [inline]
ext4_listxattr+0x4a6/0xc50 fs/ext4/xattr.c:765
vfs_listxattr fs/xattr.c:420 [inline]
listxattr+0x294/0x300 fs/xattr.c:715
path_listxattr+0xe1/0x1b0 fs/xattr.c:739
__do_sys_llistxattr fs/xattr.c:757 [inline]
__se_sys_llistxattr fs/xattr.c:754 [inline]
__x64_sys_llistxattr+0x7d/0x90 fs/xattr.c:754
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fb406978e59
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:00007ffd3a6c56e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3
RAX: ffffffffffffffda RBX: 00007fb406bf1fa0 RCX: 00007fb406978e59
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000400
RBP: 00007fb406a0ed6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb406bf1fac R14: 00007fb406bf1fa0 R15: 00007fb406bf1fa0

The buggy address belongs to the page:
page:ffffea0004b3d980 refcount:1 mapcount:1 mapping:0000000000000000 index:0x7fffffffd pfn:0x12cf66
anon flags: 0x4000000000080014(uptodate|lru|swapbacked)
raw: 4000000000080014 ffffea000498d588 ffffea000498c5c8 ffff88810d7c9679
raw: 00000007fffffffd 0000000000000000 0000000100000000 ffff888100142000
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff888100142000
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x100cca(GFP_HIGHUSER_MOVABLE), pid 94, ts 43003779711, free_ts 42994951228
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x179/0x180 mm/page_alloc.c:2462
get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384
__alloc_pages include/linux/gfp.h:544 [inline]
__alloc_pages_node include/linux/gfp.h:557 [inline]
alloc_pages_node include/linux/gfp.h:571 [inline]
alloc_pages include/linux/gfp.h:590 [inline]
wp_page_copy+0x212/0x15f0 mm/memory.c:3171
do_wp_page+0x9a6/0xc80 mm/memory.c:-1
handle_pte_fault+0xb47/0x37d0 mm/memory.c:4819
__handle_mm_fault mm/memory.c:4953 [inline]
handle_mm_fault+0xf81/0x1710 mm/memory.c:5367
do_user_addr_fault+0x5a1/0xde0 arch/x86/mm/fault.c:1343
handle_page_fault arch/x86/mm/fault.c:1436 [inline]
exc_page_fault+0x5a/0xc0 arch/x86/mm/fault.c:1492
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571
page last free stack trace:
reset_page_owner include/linux/page_owner.h:28 [inline]
free_pages_prepare mm/page_alloc.c:1349 [inline]
free_pcp_prepare mm/page_alloc.c:1421 [inline]
free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336
free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443
release_pages+0xe52/0xea0 mm/swap.c:1103
free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
tlb_flush_mmu mm/mmu_gather.c:247 [inline]
tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:326
unmap_region+0x355/0x3c0 mm/mmap.c:2811
__do_munmap+0x63c/0x850 mm/mmap.c:3041
__vm_munmap mm/mmap.c:3094 [inline]
__do_sys_munmap mm/mmap.c:3120 [inline]
__se_sys_munmap+0x130/0x1c0 mm/mmap.c:3116
__x64_sys_munmap+0x5b/0x70 mm/mmap.c:3116
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
ffff88812cf65f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88812cf66000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88812cf66080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff88812cf66100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88812cf66180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages