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]
Date:	Mon, 30 Jun 2014 17:03:57 +0200
From:	Jan Kiszka <jan.kiszka@....de>
To:	Paolo Bonzini <pbonzini@...hat.com>
CC:	Gleb Natapov <gleb@...nel.org>, Borislav Petkov <bp@...en8.de>,
	lkml <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>, x86-ml <x86@...nel.org>,
	kvm@...r.kernel.org,
	Jörg Rödel 
	<joro@...tes.org>
Subject: Re: [PATCH] KVM: SVM: Fix CPL export via SS.DPL

On 2014-06-30 17:01, Paolo Bonzini wrote:
> Il 29/06/2014 17:12, Jan Kiszka ha scritto:
>> From: Jan Kiszka <jan.kiszka@...mens.com>
>>
>> We import the CPL via SS.DPL since ae9fedc793. However, we fail to
>> export it this way so far. This caused spurious guest crashes, e.g. of
>> Linux when accessing the vmport from guest user space which triggered
>> register saving/restoring to/from host user space.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
>> ---
>>
>> Just in time for the next match :D
>>
>>  arch/x86/kvm/svm.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
>> index ec8366c..b5e994a 100644
>> --- a/arch/x86/kvm/svm.c
>> +++ b/arch/x86/kvm/svm.c
>> @@ -1462,6 +1462,7 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
>>           */
>>          if (var->unusable)
>>              var->db = 0;
>> +        var->dpl = to_svm(vcpu)->vmcb->save.cpl;
>>          break;
>>      }
>>  }
>>
> 
> Thanks.  In theory this is not necessary, the SS.DPL should be the same
> as the CPL according to the manuals (the manual say that the SS.DPL
> "should match" the CPL, and that's the only reason why I included the
> import in ae9fedc793).  But apparently this is not the case.

15.5.1:

"When examining segment attributes after a #VMEXIT:
[...]
• Retrieve the CPL from the CPL field in the VMCB, not from any segment
DPL."

Jan



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ