mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liran Alon <liran.alon@oracle.com>
To: <dwmw2@infradead.org>
Cc: <jmattson@google.com>, <konrad.wilk@oracle.com>, <x86@kernel.org>,
	<nadav.amit@gmail.com>, <bp@alien8.de>, <arjan@linux.intel.com>,
	<aliguori@amazon.com>, <thomas.lendacky@amd.com>,
	<rkrcmar@redhat.com>, <pbonzini@redhat.com>,
	<linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest
Date: Wed, 10 Jan 2018 08:51:56 -0800 (PST)	[thread overview]
Message-ID: <06779fe6-7ab6-4906-a66c-2466d03877e0@default> (raw)


----- dwmw2@infradead.org wrote:

> On Wed, 2018-01-10 at 08:19 -0800, Liran Alon wrote:
> > 
> > (1) On VMEntry, Intel recommends to just restore SPEC_CTRL to guest
> > value (using WRMSR or MSR save/load list) and that's it. As I
> > previously said to Jim, I am missing here a mechanism which should
> be
> > responsible for hiding host's BHB & RSB from guest. Therefore,
> guest
> > still have the possibility to info-leak host's kernel module
> > addresses (kvm-intel.ko / kvm.ko / vmlinux).
> 
> How so?
> 
> The host has the capability to attack the guest... but that's not an
> interesting observation.

That's not the issue I am talking about here.
I'm talking about the guest ability to info-leak addresses in host.

> 
> I'm not sure why you consider it an information leak to have host
> addresses in the BTB/RSB when the guest is running; it's not like
> they
> can be *read* from there. Perhaps you could mount a really contrived
> attack where you might attempt to provide your own spec-leak code at
> various candidate addresses that you think might be host BTB targets,
> and validate your assumptions... but I suspect basic cache-based
> observations were easier than that anyway.
> 
> I don't think this is a consideration.

Hmm... This is exactly how Google Project-Zero PoC leaks kvm-intel.ko, kvm.ko & vmlinux...
See section "Locating the host kernel" here:
https://googleprojectzero.blogspot.co.il/2018/01/reading-privileged-memory-with-side.html

This was an important primitive in order for them to actually launch the attack of reading host's memory pages. As they needed the hypervisor addresses such that they will be able to later poison the BTB/BHB to gadgets residing in known host addresses.

-Liran

             reply	other threads:[~2018-01-10 16:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 16:51 Liran Alon [this message]
2018-01-10 17:07 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2018-01-10 16:19 Liran Alon
2018-01-10 16:27 ` Paolo Bonzini
2018-01-10 17:14   ` Jim Mattson
2018-01-10 17:16     ` Paolo Bonzini
2018-01-10 17:23       ` Nadav Amit
2018-01-10 17:32         ` Jim Mattson
2018-01-10 16:47 ` David Woodhouse
2018-01-10  0:33 Liran Alon
2018-01-09 16:48 Liran Alon
2018-01-09 16:57 ` Paolo Bonzini
2018-01-10  5:03   ` Nadav Amit
2018-01-10 13:20     ` Paolo Bonzini
2018-01-10 14:06       ` Arjan van de Ven
2018-01-10 14:28         ` Paolo Bonzini
2018-01-10 15:41           ` Konrad Rzeszutek Wilk
2018-01-10 15:45             ` Paolo Bonzini
2018-01-10 15:48             ` Woodhouse, David
2018-01-10 15:56               ` Paolo Bonzini
2018-01-10 16:05                 ` David Woodhouse
2018-01-12 23:17     ` Jim Mattson
2018-01-12 23:19       ` Nadav Amit
2018-01-09 16:06 Liran Alon
2018-01-09 12:03 [PATCH v2 0/8] KVM: x86: expose CVE-2017-5715 ("Spectre variant 2") mitigations to guest Paolo Bonzini
2018-01-09 12:03 ` [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest Paolo Bonzini
2018-01-13 10:16   ` Longpeng (Mike)
2018-01-15  9:23     ` Paolo Bonzini
2018-01-15  9:34       ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06779fe6-7ab6-4906-a66c-2466d03877e0@default \
    --to=liran.alon@oracle.com \
    --cc=aliguori@amazon.com \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dwmw2@infradead.org \
    --cc=jmattson@google.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®