lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  8 Jul 2020 11:36:08 +0200
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Junaid Shahid <junaids@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/3] KVM: nSVM: fix #TF from CR3 switch when entering guest

This is a succesor of "[PATCH] KVM: x86: drop erroneous mmu_check_root()
from fast_pgd_switch()".

Undesired triple fault gets injected to L1 guest on SVM when L2 is
launched with certain CR3 values. #TF is raised by mmu_check_root()
check in fast_pgd_switch() and the root cause is that when
kvm_set_cr3() is called from nested_prepare_vmcb_save() with NPT
enabled CR3 points to a nGPA so we can't check it with
kvm_is_visible_gfn().

Fix the issue by moving kvm_mmu_new_pgd() to the right place when switching
to nested guest and drop the unneeded mmu_check_root() check from
fast_pgd_switch().

Vitaly Kuznetsov (3):
  KVM: nSVM: split kvm_init_shadow_npt_mmu() from kvm_init_shadow_mmu()
  KVM: nSVM: properly call kvm_mmu_new_pgd() upon switching to guest
  KVM: x86: drop superfluous mmu_check_root() from fast_pgd_switch()

 arch/x86/include/asm/kvm_host.h |  7 ++++++-
 arch/x86/kvm/mmu.h              |  3 ++-
 arch/x86/kvm/mmu/mmu.c          | 36 ++++++++++++++++++++++++---------
 arch/x86/kvm/svm/nested.c       |  5 +++--
 arch/x86/kvm/x86.c              |  8 +++++---
 5 files changed, 43 insertions(+), 16 deletions(-)

-- 
2.25.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ