[Android 6.1] KASAN: use-after-free Read in xattr_find_entry

0 views
Skip to first unread message

syzbot

unread,
Jun 21, 2026, 10:11:21 PM (5 hours ago) Jun 21
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 72813af230c7 Merge tag 'android14-6.1.174_r00' into androi..
git tree: android14-6.1
console output: https://syzkaller.appspot.com/x/log.txt?x=118222ae580000
kernel config: https://syzkaller.appspot.com/x/.config?x=938eb0d85bcc7e21
dashboard link: https://syzkaller.appspot.com/bug?extid=8dc2a17ad14a884441dd
compiler: Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1011a01c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=156cf4fe580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/19b9e257e25c/disk-72813af2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/356c32f574f6/vmlinux-72813af2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/77f76f9c7e3a/bzImage-72813af2.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b6715fd93b36/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=14ff5b7a580000)

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

loop2: detected capacity change from 0 to 1024
EXT4-fs: Ignoring removed orlov option
EXT4-fs (loop2): mounted filesystem without journal. Quota mode: none.
==================================================================
BUG: KASAN: use-after-free in xattr_find_entry+0x2f5/0x300 fs/ext4/xattr.c:294
Read of size 4 at addr ffff888115387004 by task syz.2.18/379

CPU: 0 PID: 379 Comm: syz.2.18 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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:0x7f245ff9ce59
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:00007ffe0fd916f8 EFLAGS: 00000246 ORIG_RAX: 000000000000010c
RAX: ffffffffffffffda RBX: 00007f2460215fa0 RCX: 00007f245ff9ce59
RDX: 000000000000017f RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f2460032e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2460215fac R14: 00007f2460215fa0 R15: 00007f2460215fa0
</TASK>

Allocated by task 117:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
__kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:334
kasan_slab_alloc include/linux/kasan.h:202 [inline]
slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
slab_alloc_node mm/slub.c:3382 [inline]
slab_alloc mm/slub.c:3392 [inline]
__kmem_cache_alloc_lru mm/slub.c:3399 [inline]
kmem_cache_alloc+0x166/0x320 mm/slub.c:3408
skb_clone+0x1e8/0x380 net/core/skbuff.c:1663
do_one_broadcast net/netlink/af_netlink.c:1454 [inline]
netlink_broadcast+0x698/0x1170 net/netlink/af_netlink.c:1520
uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline]
kobject_uevent_net_broadcast+0x3cb/0x5b0 lib/kobject_uevent.c:409
kobject_uevent_env+0x541/0x720 lib/kobject_uevent.c:608
kobject_synth_uevent+0x457/0x940 lib/kobject_uevent.c:208
uevent_store+0x25/0x70 drivers/base/core.c:2690
dev_attr_store+0x6c/0x90 drivers/base/core.c:2389
sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
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
entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 103:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1750 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
slab_free mm/slub.c:3712 [inline]
kmem_cache_free+0x12d/0x300 mm/slub.c:3737
kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1
__kfree_skb net/core/skbuff.c:874 [inline]
consume_skb+0xb3/0x1f0 net/core/skbuff.c:1038
skb_free_datagram+0x15/0x20 net/core/datagram.c:322
netlink_recvmsg+0x5e3/0xe00 net/netlink/af_netlink.c:1951
____sys_recvmsg+0x2d6/0x5c0 net/socket.c:-1
___sys_recvmsg+0x210/0x590 net/socket.c:2769
__sys_recvmsg net/socket.c:2799 [inline]
__do_sys_recvmsg net/socket.c:2809 [inline]
__se_sys_recvmsg net/socket.c:2806 [inline]
__x64_sys_recvmsg+0x20a/0x2e0 net/socket.c:2806
x64_sys_call+0x75/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:48
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

The buggy address belongs to the object at ffff888115387000
which belongs to the cache skbuff_head_cache of size 256
The buggy address is located 4 bytes inside of
256-byte region [ffff888115387000, ffff888115387100)

The buggy address belongs to the physical page:
page:ffffea000454e1c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888115387140 pfn:0x115387
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea000454e108 ffffea000454e208 ffff8881001f1e00
raw: ffff888115387140 00000000000c0006 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 117, tgid 117 (udevadm), ts 4330601731, free_ts 0
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
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
kmem_cache_alloc_node+0x1ba/0x330 mm/slub.c:3429
__alloc_skb+0xe8/0x4a0 net/core/skbuff.c:508
alloc_skb include/linux/skbuff.h:1322 [inline]
alloc_uevent_skb+0x85/0x240 lib/kobject_uevent.c:290
uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline]
kobject_uevent_net_broadcast+0x343/0x5b0 lib/kobject_uevent.c:409
kobject_uevent_env+0x541/0x720 lib/kobject_uevent.c:608
kobject_synth_uevent+0x457/0x940 lib/kobject_uevent.c:208
uevent_store+0x25/0x70 drivers/base/core.c:2690
dev_attr_store+0x6c/0x90 drivers/base/core.c:2389
page_owner free stack trace missing

Memory state around the buggy address:
ffff888115386f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888115386f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888115387000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888115387080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888115387100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
==================================================================
EXT4-fs error (device loop2): xattr_find_entry:297: inode #12: comm syz.2.18: corrupted xattr entries


---
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