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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190109172738.GC1821@linux.intel.com>
Date:   Wed, 9 Jan 2019 09:27:38 -0800
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        linux-kernel@...r.kernel.org, Andrew Jones <drjones@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH] x86/kvm/nVMX: don't skip emulated instruction twice when
 vmptr address is not backed

On Wed, Jan 09, 2019 at 06:22:56PM +0100, Vitaly Kuznetsov wrote:
> Since commit 09abb5e3e5e50 ("KVM: nVMX: call kvm_skip_emulated_instruction
> in nested_vmx_{fail,succeed}") nested_vmx_failValid() results in
> kvm_skip_emulated_instruction() so doing it again in handle_vmptrld() when
> vmptr address is not backed is wrong, we end up advancing RIP twice.
> 
> Fixes: fca91f6d60b6e ("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page")
> Reported-by: Cornelia Huck <cohuck@...hat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>

Reviewed-by: Sean Christopherson <sean.j.christopherson@...el.com>

> ---
>  arch/x86/kvm/vmx/nested.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index 3170e291215d..2616bd2c7f2c 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -4540,9 +4540,8 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
>  			 * given physical address won't match the required
>  			 * VMCS12_REVISION identifier.
>  			 */
> -			nested_vmx_failValid(vcpu,
> +			return nested_vmx_failValid(vcpu,
>  				VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
> -			return kvm_skip_emulated_instruction(vcpu);
>  		}
>  		new_vmcs12 = kmap(page);
>  		if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ