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: <20210215184644.GA8689@amd>
Date:   Mon, 15 Feb 2021 19:46:44 +0100
From:   Pavel Machek <pavel@....cz>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 048/104] KVM: x86: cleanup CR3 reserved bits checks

Hi!

> [ Upstream commit c1c35cf78bfab31b8cb455259524395c9e4c7cd6 ]
> 
> If not in long mode, the low bits of CR3 are reserved but not enforced to
> be zero, so remove those checks.  If in long mode, however, the MBZ bits
> extend down to the highest physical address bit of the guest, excluding
> the encryption bit.
> 
> Make the checks consistent with the above, and match them between
> nested_vmcb_checks and KVM_SET_SREGS.

> +++ b/arch/x86/kvm/x86.c
> @@ -9558,6 +9558,8 @@ static int kvm_valid_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
>  		if (!(sregs->cr4 & X86_CR4_PAE)
>  		    || !(sregs->efer & EFER_LMA))
>  			return -EINVAL;
> +		if (sregs->cr3 & vcpu->arch.cr3_lm_rsvd_bits)
> +			return false;
>  	} else {

Function has different return type between 5.10 and 5.11, so this
needs fixing.

Best regards,
								Pavel

-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ