All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alexander Graf <graf@amazon.com>,
	"Reshetova, Elena" <elena.reshetova@intel.com>,
	Dan Middleton <dan.middleton@linux.intel.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"Kalra, Ashish" <ashish.kalra@amd.com>
Subject: Re: Confidential Computing call May 10: RTMR ABI & TEE I/O
Date: Wed, 12 Jun 2024 08:48:16 -0400	[thread overview]
Message-ID: <a3db9f73fb6b95329978c0951754ec8ce2493ccb.camel@HansenPartnership.com> (raw)
In-Reply-To: <e1a22a93-bf58-4aa7-a94e-9d2907f2ef02@amazon.com>

On Mon, 2024-06-10 at 14:09 +0200, Alexander Graf wrote:
> On 08.06.24 16:41, James Bottomley wrote:
> > On Fri, 2024-06-07 at 18:05 +0200, Alexander Graf wrote:
[...]
> > > 1) Measurement purely based on initial launch measurements. If
> > > the full OS is inside an initramfs, we can provide
> > > firmware+kernel+initramfs as "seed". The CoCo env would measure
> > > everything and I have an easy path to validate authenticity of my
> > > target environment. I also have an easy path  to update the VM
> > > and then measure without replaying any event logs.
> > With an SVSM (that you're not replacing, so the initial launch
> 
> 
> That assumes you want an SVSM in the first place.

Well, yes.  This is a flexibility issue.  If you don't have a highly
privileged SVSM like entity to fix up issues and add features, you're
left with only the hardware lifecycle.

>  I
>    a) Don't think you really need to and

Most CSPs are already doing something similar to this even for non-
confidential VMs.

>    b) Believe it should come from the customer, not the cloud
> provider, as it's the highest privileged piece of code in your VM

No, the security processor firmware is the highest privilege level ...
and that doesn't come from the customer ...

The point is not that the customer should own the component and be
forced to supply it, it's that the customer should be able to inspect
it and verify the measurement corresponds to the inspected code. 
Ideally, if we get commonality of SVSMs, it becomes a singular trusted
component (like shim/grub) in the boot sequence.

> For both, the easy solution is to allow a customer to reboot into
> their own "initial launch measurement" from a currently running VM.

How, though?  The current SNP launch measurement won't change across a
kexec reboot.  If you have a mechanism that allows it to be updated
from the kernel, that will be subject to attack by a kernel exploit, so
letting a more privileged and protected entity control that seems to be
a better security model.

[...]
> > > 2) Update SVSM (or similar). Often today, you want to implement
> > > TPMs and inside a higher privileged component that is really part
> > > of the VM. To update it, you could use in-VM mechanisms, but that
> > > leaves a path where you boot with an old version -> exploit ->
> > > update to the new. If we could "reboot"/kexec into a new SVSM, we
> > > could reason about its confidentiality with a 100% guarantee.
> >  
> > This one's a bit more difficult because the initial launch
> > measurement becomes invalid if the SVSM is replaced.  What I'd
> > suggest happens here is that the SVSM reinit everything (including
> > the vTPM), then measure a "replace SVSM" record containing both the
> > old and new SVSM measurements and then do a measured boot.  That
> > way an attesting system can tie the old launch measurement to the
> > updated SVSM.
> 
> 
> This only works if the SVSM doesn't have any security
> vulnerabilities. 

In the same way that any VM kexec reboot only works if the security
processor doesn't have any vulnerabilities.  If you have a
vulnerability, either in the ASP or the SVSM you have to assess whether
it's been exploited before deciding to kexec reboot or tear down and
reinit with an updated TCB.

> If it does, you can't trust the measurement anymore and your whole 
> update path is out of the window. For CoCo, we need to make sure that
> there is a viable way for users to run secure versions of all code 
> without depending on the merit of their infrastructure provider, no?

That's not possible to guarantee in practice because of potential
vulnerabilities in other code/firmware aspects of the system regardless
of whether there's an SVSM.  The point being that you *always* have
this problem regardless of whether an SVSM is present or not.

James


  reply	other threads:[~2024-06-12 12:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 19:55 Confidential Computing call May 10: RTMR ABI & TEE I/O Dan Middleton
2024-05-07 16:17 ` James Bottomley
2024-05-13  5:10 ` Samuel Ortiz
2024-06-07 14:24 ` Alexander Graf
2024-06-07 14:46   ` Reshetova, Elena
2024-06-07 16:05     ` Alexander Graf
2024-06-08 14:41       ` James Bottomley
2024-06-10 12:09         ` Alexander Graf
2024-06-12 12:48           ` James Bottomley [this message]
2024-06-12 11:19       ` Reshetova, Elena
2024-06-12 11:49         ` Alexander Graf
2024-06-12 13:19           ` Reshetova, Elena
2024-06-12 21:18             ` Steve Rutherford

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=a3db9f73fb6b95329978c0951754ec8ce2493ccb.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=ashish.kalra@amd.com \
    --cc=dan.middleton@linux.intel.com \
    --cc=elena.reshetova@intel.com \
    --cc=graf@amazon.com \
    --cc=linux-coco@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.