linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Jörg Rödel" <jroedel@suse.de>
Cc: James Bottomley <jejb@linux.ibm.com>,
	Christophe de Dinechin Dupont de Dinechin <cdupontd@redhat.com>,
	linux-coco@lists.linux.dev, amd-sev-snp@lists.suse.com
Subject: Re: SVSM initiated early attestation / guest secrets injection
Date: Fri, 20 Jan 2023 08:57:29 +0000	[thread overview]
Message-ID: <Y8pXeZHY+bKQDen2@redhat.com> (raw)
In-Reply-To: <Y8pSzx1g8THT3rnC@suse.de>

On Fri, Jan 20, 2023 at 09:37:35AM +0100, Jörg Rödel wrote:
> On Thu, Jan 19, 2023 at 04:29:23PM -0500, James Bottomley wrote:
> > How can they stay there?  Even if the SVSM is the point of first
> > contact to receive the secret, it must give the secret to higher VMPLs
> > to try the mount, so the higher VMPLs have to destroy the secret they
> > were given on failure.
> 
> My thinking was that the SVSM will only hand out the secrets once the
> code in higher VMPLs has proven itself to be trusted. But it is possible
> for an attacker to create an image with the expected parts to get the
> measurements right and then use a fall-back mount if decryption fails to
> steal the secret.

With a vTPM, and systemd-pcrphase.service, it is possible to seal
secrets to prevent such an attack, by including phase=initrd in
the sealing PCRs. IOW, nothing after the initrd can unseal the
secrets, even if a different filesystem mount was substituted.

Secrets that are needed /after/ the root FS is mounted (eg SSH
host key, Apache HTTP certs) can be sealed with a PCR set that
covers the LUKS master key hash, so that they can only be acccessed
if the correct rootfs was unlocked.

In the vTPM case, the guest owner is deciding policy when they
seal secrets to the vTPM during guest provisioning initially.
If we try to support a scenario without a vTPM, then the guest
owner has to determine policy by using a carefully built initrd
that does not do any fallbacks, and they have to rely on having
a known firmware with a particular set to certs enrolled, which
has support implications for public clouds. Much less flexible.
 
> But such mount fallbacks a generally a bad idea in a CVM.

Yep, but hopefully not fatal, if the user picks a suitable set
of PCRs for sealing data.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


  reply	other threads:[~2023-01-20  8:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 14:39 SVSM initiated early attestation / guest secrets injection Daniel P. Berrangé
2023-01-13 17:22 ` Jörg Rödel
2023-01-13 18:02   ` James Bottomley
2023-01-14 16:57     ` Jörg Rödel
2023-01-19 14:05     ` Christophe de Dinechin Dupont de Dinechin
2023-01-19 14:10       ` James Bottomley
2023-01-19 21:18         ` Jörg Rödel
2023-01-19 21:29           ` James Bottomley
2023-01-20  8:37             ` Jörg Rödel
2023-01-20  8:57               ` Daniel P. Berrangé [this message]
2023-01-20 12:39                 ` James Bottomley
2023-01-20 12:51                   ` Daniel P. Berrangé
2023-01-20 17:10                     ` James Bottomley
2023-01-20 12:32               ` James Bottomley
2023-01-13 18:28   ` Daniel P. Berrangé
2023-01-13 18:52     ` Dionna Amalie Glaze
2023-01-16  9:36       ` Daniel P. Berrangé
2023-01-14 17:08     ` Jörg Rödel
2023-01-14 18:22       ` James Bottomley
2023-01-16 16:55         ` Jörg Rödel
2023-01-16 16:59           ` James Bottomley
2023-01-17 16:47             ` Jörg Rödel
2023-01-16 17:13           ` Daniel P. Berrangé
2023-01-17 16:53             ` Jörg Rödel

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=Y8pXeZHY+bKQDen2@redhat.com \
    --to=berrange@redhat.com \
    --cc=amd-sev-snp@lists.suse.com \
    --cc=cdupontd@redhat.com \
    --cc=jejb@linux.ibm.com \
    --cc=jroedel@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).