Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1017864pxb; Thu, 25 Feb 2021 23:46:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1vZYkM3eXx141Esw7U8vBtmag5buRDw7TT71AFtJ1X31IXIlitHjpUFTfRXfssy/icnwA X-Received: by 2002:a05:6402:2215:: with SMTP id cq21mr1897196edb.281.1614325581471; Thu, 25 Feb 2021 23:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614325581; cv=none; d=google.com; s=arc-20160816; b=j7hwMIzVkJdmFpPDBi1hhB6mm8TyvFtUxXeL8/OxfxefXc43C41HKNNNsgcoR34VHS jeWvGsmAdOjGp421PtmLDqduxNX7N+TEweJv0/CcC0WiUTwNYk7tS0a8kJJcbkDVvmcH A1iOhxnhNltwMeuif3esiHf778b8Zhe8rxPd6SdBIZJJ705N/3rNphxRY6o5GUL0su5D 5xfB1ugfXGLfHYrdy/qwrRUaptkMh5m8eZyVLb1XFhSv7EtOtsgz1hvl8KRTrRdOqsHs ptI669ULU6cYuTacaoy2sFjYsPVhmLL1+DHz0LCwN1h4eOYkWSQc1w/qLxp979hi1C+1 waBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OMr4ZfOdknvNK6qxXkZDsfjyOXK7e1+8va3gHtKGjwA=; b=hAUNovoum1J/vbHwPT4NT+ZSsiAD7iQaYRoI5MgK5FfCENJEdlLGMf+zaDQEqcyBq4 286FZtEWwtixOqqCuVIYOisDy0rEIoSlJ1HvPXItGJ6MbL/3R8oETGpV0TcxkSBpfutm DTBoKq40jtLSjABHuiLRHv5Ww+8zEZLhNSLAsEx8nTlxkE7Pj1dfeJS2tJRFDY/+O2WF KIMn/pf93IRuFjzeY9OSIjyLIqHlm/+3Mv2dqZVvb75Yw18qT8gfVp94+lAqsEptbZTV ndXjvS7P31dVot7lHwfGRMbbV18Zbr2c3GbCVrOfZT30puLjUzOdgBLCcFKeVaAZp04t aSFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uUuOr7J7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si5137344edy.117.2021.02.25.23.45.57; Thu, 25 Feb 2021 23:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uUuOr7J7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbhBZHn2 (ORCPT + 99 others); Fri, 26 Feb 2021 02:43:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbhBZHn0 (ORCPT ); Fri, 26 Feb 2021 02:43:26 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9088C061574; Thu, 25 Feb 2021 23:42:45 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id f33so8271348otf.11; Thu, 25 Feb 2021 23:42:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OMr4ZfOdknvNK6qxXkZDsfjyOXK7e1+8va3gHtKGjwA=; b=uUuOr7J72pmh4I1i5YDidK6nLmFE9UYmhR7DOjEGxVj67/71vDovgvRIl7z55hbS3W uopiLYc05Wy9ES/FYFnvnFFU2ubhjiAtsiS+MjWNVX05sEnWokgM761QCZeWFRlw8Jb1 Q8HCG5k68WR5w0oKA5WP+xP89V8JkD91eTJenIwtCgNVv9LDX67DZ+5YT3tbzzuOAMzA gfI8CWApcqk9WijXdD4saDWIywv1jkDSqL79Pk+Gw9LdpLBdOWMlQtH/Epq5S4XEJkDT ceIpWplenAyDLhI9DBKv488PxXfDvxpbpVf7GR9BoSkZy9pDtSTppzfFM83uP2vQwiNH OVgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OMr4ZfOdknvNK6qxXkZDsfjyOXK7e1+8va3gHtKGjwA=; b=cAA9srlnYS14AHRv/m2uBFeCK6y6bFzu+WErzfX+gMwkchm9Dka9kY4qolR6D9tf4T d4r3iK3t4M2zCeI1GSZcc0Z65GUcIM+BwS1kZuuAUfZtWIw5O3pqixW3BDCaOBhvwW5+ s4rBatd2zGsb2MoREVboouSzHyPVvaJS2EffOGqINWDbPZjsSbBc9v4TzBML3lCMCqKA Lua/xwaDMlSqOfEKw46myEjHocUfroXxMMHZ9X0cg4KsYlL31EHA2z4GUAYycDre9EGB xiVvy9spdE3hRVKdaOdqoe1qbwobYcIP3l5X1VmHZZEFWQ34yXtzzYYbgsuMoGJAB3fC vObw== X-Gm-Message-State: AOAM532sjz6bvpI17jrLErrVerKDTDKvmsBR5PsiYeuq+F4Q8INyhu22 EI8ud7saS0dN4T528mIjX7KZyrUV4VtsOqbS9s8= X-Received: by 2002:a05:6830:10c1:: with SMTP id z1mr1284708oto.254.1614325365271; Thu, 25 Feb 2021 23:42:45 -0800 (PST) MIME-Version: 1.0 References: <000000000000a6093b05bc37caae@google.com> In-Reply-To: <000000000000a6093b05bc37caae@google.com> From: Wanpeng Li Date: Fri, 26 Feb 2021 15:42:34 +0800 Message-ID: Subject: Re: general protection fault in kvm_hv_irq_routing_update To: syzbot Cc: aaronlewis@google.com, Borislav Petkov , Andrew Jones , Alexander Graf , "H. Peter Anvin" , Jim Mattson , Joerg Roedel , kvm , LKML , "open list:KERNEL SELFTEST FRAMEWORK" , makarandsonare@google.com, Ingo Molnar , Paolo Bonzini , Sean Christopherson , Shuah Khan , syzkaller-bugs@googlegroups.com, Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Feb 2021 at 15:01, syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit: a99163e9 Merge tag 'devicetree-for-5.12' of git://git.kern.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12d72682d00000 > kernel config: https://syzkaller.appspot.com/x/.config?x=7a875029a795d230 > dashboard link: https://syzkaller.appspot.com/bug?extid=6987f3b2dbd9eda95f12 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12faef12d00000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=163342ccd00000 > > The issue was bisected to: > > commit 8f014550dfb114cc7f42a517d20d2cf887a0b771 > Author: Vitaly Kuznetsov > Date: Tue Jan 26 13:48:14 2021 +0000 > > KVM: x86: hyper-v: Make Hyper-V emulation enablement conditional > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10df16a8d00000 > final oops: https://syzkaller.appspot.com/x/report.txt?x=12df16a8d00000 > console output: https://syzkaller.appspot.com/x/log.txt?x=14df16a8d00000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+6987f3b2dbd9eda95f12@syzkaller.appspotmail.com > Fixes: 8f014550dfb1 ("KVM: x86: hyper-v: Make Hyper-V emulation enablement conditional") > > L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. > general protection fault, probably for non-canonical address 0xdffffc0000000028: 0000 [#1] PREEMPT SMP KASAN > KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] > CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] > RIP: 0010:kvm_hv_set_sint_gsi arch/x86/kvm/hyperv.c:475 [inline] > RIP: 0010:kvm_hv_irq_routing_update+0x230/0x460 arch/x86/kvm/hyperv.c:498 > Code: 80 19 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 ff 01 00 00 4d 8b ad 80 19 00 00 49 8d bd 40 01 00 00 48 89 f8 48 c1 e8 03 <0f> b6 04 28 84 c0 74 06 0f 8e d2 01 00 00 45 0f b6 bd 40 01 00 00 > RSP: 0018:ffffc90001b3fac0 EFLAGS: 00010206 > RAX: 0000000000000028 RBX: ffff888012df5900 RCX: 0000000000000000 > RDX: ffff888022193780 RSI: ffffffff81174d43 RDI: 0000000000000140 > RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc900018819eb > R10: ffffffff81170f3e R11: 0000000000000000 R12: 0000000000000000 > R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 > FS: 0000000000a73300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000557e8c876888 CR3: 0000000013c0b000 CR4: 00000000001526e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Call Trace: > kvm_set_irq_routing+0x69b/0x940 arch/x86/kvm/../../../virt/kvm/irqchip.c:223 > kvm_vm_ioctl+0x12d0/0x2800 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3959 > vfs_ioctl fs/ioctl.c:48 [inline] > __do_sys_ioctl fs/ioctl.c:753 [inline] > __se_sys_ioctl fs/ioctl.c:739 [inline] > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 > do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 > entry_SYSCALL_64_after_hwframe+0x44/0xae > RIP: 0033:0x43ef29 > Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007ffe391eb808 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 > RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ef29 > RDX: 0000000020000140 RSI: 000000004008ae6a RDI: 0000000000000004 > RBP: 0000000000402f10 R08: 0000000000400488 R09: 0000000000400488 > R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000402fa0 > R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488 > Modules linked in: > ---[ end trace 2aa75ec1dd148710 ]--- > RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] Missing check to_hv_vcpu(vcpu) in synic_get(), I will fix it. > RIP: 0010:kvm_hv_set_sint_gsi arch/x86/kvm/hyperv.c:475 [inline] > RIP: 0010:kvm_hv_irq_routing_update+0x230/0x460 arch/x86/kvm/hyperv.c:498 > Code: 80 19 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 ff 01 00 00 4d 8b ad 80 19 00 00 49 8d bd 40 01 00 00 48 89 f8 48 c1 e8 03 <0f> b6 04 28 84 c0 74 06 0f 8e d2 01 00 00 45 0f b6 bd 40 01 00 00 > RSP: 0018:ffffc90001b3fac0 EFLAGS: 00010206 > RAX: 0000000000000028 RBX: ffff888012df5900 RCX: 0000000000000000 > RDX: ffff888022193780 RSI: ffffffff81174d43 RDI: 0000000000000140 > RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc900018819eb > R10: ffffffff81170f3e R11: 0000000000000000 R12: 0000000000000000 > R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 > FS: 0000000000a73300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000557e8c876888 CR3: 0000000013c0b000 CR4: 00000000001526e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > > > --- > 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 syzkaller@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > For information about bisection process see: https://goo.gl/tpsmEJ#bisection > syzbot can test patches for this issue, for details see: > https://goo.gl/tpsmEJ#testing-patches