KASAN: use-after-free Write in paging64_update_accessed_dirty_bits (2)

9 views
Skip to first unread message

syzbot

unread,
Sep 29, 2021, 8:43:28 AM9/29/21
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d5fa5fb1ccb2 UPSTREAM: seccomp: Fix setting loaded filter ..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=1759890f300000
kernel config: https://syzkaller.appspot.com/x/.config?x=12fdca0186751701
dashboard link: https://syzkaller.appspot.com/bug?extid=e32294b8ad915bc6aa02
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1

Unfortunately, I don't have any reproducer for this issue yet.

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

==================================================================
BUG: KASAN: use-after-free in paging64_cmpxchg_gpte arch/x86/kvm/paging_tmpl.h:166 [inline]
BUG: KASAN: use-after-free in paging64_update_accessed_dirty_bits+0x5b9/0x9d0 arch/x86/kvm/paging_tmpl.h:272
Write of size 8 at addr ffff888010001000 by task syz-executor.3/5743

CPU: 0 PID: 5743 Comm: syz-executor.3 Not tainted 5.4.125-syzkaller-00028-gd5fa5fb1ccb2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x24e lib/dump_stack.c:118
print_address_description+0x9b/0x650 mm/kasan/report.c:384
__kasan_report+0x182/0x260 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
check_memory_region_inline mm/kasan/generic.c:141 [inline]
check_memory_region+0x2a5/0x2e0 mm/kasan/generic.c:191
paging64_cmpxchg_gpte arch/x86/kvm/paging_tmpl.h:166 [inline]
paging64_update_accessed_dirty_bits+0x5b9/0x9d0 arch/x86/kvm/paging_tmpl.h:272
paging64_walk_addr_generic+0xd6d/0x16d0 arch/x86/kvm/paging_tmpl.h:445
paging64_walk_addr arch/x86/kvm/paging_tmpl.h:502 [inline]
paging64_gva_to_gpa+0xd0/0x1a0 arch/x86/kvm/paging_tmpl.h:957
kvm_mmu_gva_to_gpa_write arch/x86/kvm/x86.c:5395 [inline]
emulator_cmpxchg_emulated+0x1b5/0x7c0 arch/x86/kvm/x86.c:5865
__load_segment_descriptor+0xe1c/0x1560 arch/x86/kvm/emulate.c:1763
x86_emulate_insn+0x1037/0x6200 arch/x86/kvm/emulate.c:5718
x86_emulate_instruction+0xc6b/0x2a30 arch/x86/kvm/x86.c:6810
vcpu_enter_guest+0x28c2/0x3ea0 arch/x86/kvm/x86.c:8349
vcpu_run+0x344/0xc00 arch/x86/kvm/x86.c:8413
kvm_arch_vcpu_ioctl_run+0x463/0x950 arch/x86/kvm/x86.c:8635
kvm_vcpu_ioctl+0x812/0xdc0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2930
do_vfs_ioctl+0x76a/0x1720 fs/ioctl.c:47
ksys_ioctl fs/ioctl.c:742 [inline]
__do_sys_ioctl fs/ioctl.c:749 [inline]
__se_sys_ioctl fs/ioctl.c:747 [inline]
__x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747
do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f5525386709
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f55230dd188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f552548b020 RCX: 00007f5525386709
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000006
RBP: 00007f55253e0cb4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdd3da518f R14: 00007f55230dd300 R15: 0000000000022000

The buggy address belongs to the page:
page:ffffea0000400040 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea0000400048 ffffea0000400048 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
ffff888010000f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888010000f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888010001000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888010001080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888010001100: 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.

syzbot

unread,
Jan 27, 2022, 7:44:11 AM1/27/22
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages