Hello,
syzbot found the following issue on:
HEAD commit: f61a392235e0 Merge 5.10.272 into android13-5.10-lts
git tree: android13-5.10-lts
console+strace:
https://syzkaller.appspot.com/x/log.txt?x=17fa062d580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=40fa24cc6888ca30
dashboard link:
https://syzkaller.appspot.com/bug?extid=d5ea132b00a98c5392e0
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=17ea928d580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=1608d5e1580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/1067764b73c1/disk-f61a3922.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/eda1b07ee362/vmlinux-f61a3922.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/109d1701bea2/bzImage-f61a3922.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/766542c40883/mount_0.gz
fsck result: OK (log:
https://syzkaller.appspot.com/x/fsck.log?x=1770ccb1580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+d5ea13...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in memcmp lib/string.c:942 [inline]
BUG: KASAN: use-after-free in bcmp+0x81/0xd0 lib/string.c:964
Read of size 1 at addr ffff88811f1280a0 by task syz-executor167/299
CPU: 1 PID: 299 Comm: syz-executor167 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/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+0x100/0x140 mm/kasan/report.c:452
__asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
memcmp lib/string.c:942 [inline]
bcmp+0x81/0xd0 lib/string.c:964
ext4_xattr_value_same+0x147/0x1d0 fs/ext4/xattr.c:2258
ext4_xattr_set_handle+0x7d8/0x12b0 fs/ext4/xattr.c:2380
ext4_xattr_set+0x1f3/0x310 fs/ext4/xattr.c:2503
ext4_xattr_security_set+0x3b/0x50 fs/ext4/xattr_security.c:30
__vfs_setxattr+0x3e2/0x430 fs/xattr.c:177
__vfs_setxattr_noperm+0x10e/0x4d0 fs/xattr.c:208
__vfs_setxattr_locked+0x203/0x220 fs/xattr.c:266
vfs_setxattr+0x8d/0x1c0 fs/xattr.c:283
setxattr+0x1df/0x3f0 fs/xattr.c:548
path_setxattr+0x11f/0x230 fs/xattr.c:567
__do_sys_lsetxattr fs/xattr.c:589 [inline]
__se_sys_lsetxattr fs/xattr.c:585 [inline]
__x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:585
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3356543309
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:00007f3356517148 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007f3356543309
RDX: 0000200000000100 RSI: 0000200000000080 RDI: 0000200000000000
RBP: 0000200000000000 R08: 0000000000000000 R09: 203a6362696c6720
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000080
R13: 0000200000000100 R14: 00007ffed1b96830 R15: 00007ffed1b96918
The buggy address belongs to the page:
page:ffffea00047c4a00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x11f128
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea00047c5208 ffffea000479e208 0000000000000000
raw: 0000000000000001 0000000000000003 00000000ffffff7f 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 0x8100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|0x8000000), pid 282, ts
19482217225, free_ts
19497908015
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x176/0x190 mm/page_alloc.c:2462
get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x29a/0x640 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]
do_anonymous_page mm/memory.c:3963 [inline]
handle_pte_fault+0x153b/0x3910 mm/memory.c:4795
__handle_mm_fault mm/memory.c:4953 [inline]
handle_mm_fault+0xf86/0x1720 mm/memory.c:5367
do_user_addr_fault+0x576/0xe20 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+0xe41/0xe90 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+0x12c/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:
ffff88811f127f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811f128000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811f128080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811f128100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811f128180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
---
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