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>] [day] [month] [year] [list]
Date:	Fri, 7 Aug 2015 09:31:01 +0200
From:	Joerg Roedel <joro@...tes.org>
To:	Nicholas Krause <xerofoify@...il.com>
Cc:	gleb@...nel.org, pbonzini@...hat.com, x86@...nel.org,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RTF] kvm:x86:Fix error checking in the function pf_interception

On Thu, Aug 06, 2015 at 10:10:23PM -0400, Nicholas Krause wrote:
> This fixes error checking in the function pf_interception by
> checking if the call to kvm_mmu_unprotect_page_virt returns
> zero to indicate the function has failed internally and if
> this occurs we must return immediately to the caller of the
> function pf_interception with the return value of zero from
> the call to the function kvm_mmu_unprotect_page_virt to indicate
> failure to the caller of the function pf_interception.
> 
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
>  arch/x86/kvm/svm.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 8e0c084..a57aee1 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1814,8 +1814,11 @@ static int pf_interception(struct vcpu_svm *svm)
>  		error_code = svm->vmcb->control.exit_info_1;
>  
>  		trace_kvm_page_fault(fault_address, error_code);
> -		if (!npt_enabled && kvm_event_needs_reinjection(&svm->vcpu))
> -			kvm_mmu_unprotect_page_virt(&svm->vcpu, fault_address);
> +		if (!npt_enabled && kvm_event_needs_reinjection(&svm->vcpu)) {
> +			r = kvm_mmu_unprotect_page_virt(&svm->vcpu, fault_address);
> +			if (!r)
> +				break;
> +		}

NAK. kvm_mmu_unprotect_page_virt does not return an error but whether it
unprotected a page or not. This patch breaks SVM.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ