Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Reshetova, Elena" <elena.reshetova@intel.com>
Cc: "Jiang, Dave" <dave.jiang@intel.com>,
	Xu Yilun <yilun.xu@linux.intel.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	Jiri Pirko <jiri@resnulli.us>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	Alexey Kardashevskiy <aik@amd.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Steven Price <steven.price@arm.com>,
	Kiryl Shutsemau <kas@kernel.org>,
	"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	John Allen <john.allen@amd.com>, Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance
Date: Mon, 9 Nov 2026 09:47:43 -0400	[thread overview]
Message-ID: <20261109134743.GM770409@nvidia.com> (raw)
In-Reply-To: <DS4PPFA84FA90FC12B59A447BBEFE2053D8E7732@DS4PPFA84FA90FC.namprd11.prod.outlook.com>

On Mon, Nov 09, 2026 at 10:55:02AM +0000, Reshetova, Elena wrote:
> > The host could inject GET_CERTIFICATES on its own right before
> > KEY_EXCHANGE, and I'm wondering if we end up with this scheme if the
> > 1.3 mode should simply have the host issue GET_CERTIFICATES and the
> > TSM side just does GET_DIGESTS.
> 
> While it might be ok from security pov, it looks somewhat hacky...

It also feels hacky to build a FW call just to issue GET_CERTIFICATES
in plaintext so that Linux can capture them and the FW throws the data
away..

> > > On TDX the re-read of the chains comes with the measurement
> > > refresh. The kernel doesn't ask for it separately. For option (A) I
> > > think the kernel can drop the re-read chains and pass up only the
> > > new MEASUREMENTS. It already has the copy KEY_EXCHANGE signed.
> > 
> > I don't know why you guys do this, I would take it out, IMHO. Just
> > wastes time. Yes, kernel should forward the chain it collected with
> > KEY_EXCHANGE, it isn't allowed to change and there is no need to
> > recollect it.
> 
> I wasn’t part of the original design, but as far as I understand it was
> designed this way to allow cases when *some* cert chains/keys can
> change during device runtime as a result of a device FW update.

Who would ever check it? As I said there is only one security relevant
use of the certs, at the start. You can audit later, but who cares if
the certs have expired or changed during audit? What audit wants to
check is that the device hasn't changed in a negative way. Loosing
it's privkey absolutely should be considered an negative audit failing
thing.

> Especially when we think of multi-key case, different device keys may
> have different life spawn and *some* keys/chains will be changed when
> a FW update happens on a device. I think typically SPDM slot 0 (identity)
> remains stable, but rest of the keys can change. 

And, again, IMHO, the device is fully broken if it changes the keys in
the slot during operation. If the OS is doing auditing and requesting
a signed GET_MEASUREMENTS every hour the signing key *can not change*.
That would be completely insane from a security POV.

On FW live update the device has to retain any in progress session
exactly as is. It can manifest the new keys/slots only once when the next
GET_VERSION comes through and resets things. Think about the races any
other solution would create :(

> But of course in order to stay secure in such cases you will need to have
> a cryptographic binding between the old and new keys. This can be done
> given that re-collection happens inside previously verified and established
> SPDM secure session and you can put additional security

Nope, by the point you get to auditing the verifier can no longer make
the same assumption that the OS is actually still secure. It's job is
to prove that, it cannot assume it. This is different from a fresh
boot right off DRTM that is still in the initrd where we can much more
confidently say the OS is in a known state and we can trust it to have
done all the measurements correctly before using the PCI devices.

However, if the OS has since been hacked later on then it would be
trivial to just present new GET_DIGESTS, certificates, keys and
measuremnts relayed from some other device to hide its hacked
activities.

Allowing key change without a direct signed hand off is security
unacceptable. If you want to do live slot updates then the old slots
must be retained as is exactly while the connection lives, new slots
can be added, and you'd need to collect a new GET_DIGESTS signed by
the original slot. The spec doesn't really have a way to do any of
this it seems.

And you need a log of all these events for the auditor to check
everything. Overall it is super complicated for almost no benifit. I
wouldn't do it.

But definately Linux should not be supporting a broken version of
this, if Linux cannot directly confirm the signed authenticity of the
keys the it must not present them to userspace.

IMHO the spec needs changes for this kind of use model, it is missing
a pretty key operation: 'get digests signed' where you'd get the
digest of every slot *AND* an array of sigantures from every slot over
those digests.

Instead at best we get a single signature over all digests, so you end
up with the OS and verifier locked to a single key the OS seleceted at
startup.

> This is current design for single-key case (multi-key is not supported). 
> Given this, it makes sense to use fixed slot 0 to always establish SPDM
> session (since other slots must have the same key anyhow), but allow
> VMM to configure if it wants single slot (faster, less fetching) or all
> slots or a subset of slots. IMO, in a single key case it makes sense to fetch
> all slots and chains available and pass this info to the guest to maximize
> chances that guest will find at least one of these chains acceptable per its
> trust policy. 

I'd prefer that this be done via CHALLENGE at the start when possible
so we have a signed GET_DIGESTS to send to the guest and to the
verifier. But as a backup reading them over the encrypted session and
checking that every leaf PUBKEY is identical seems reasonable, but
only for 1.2 and must not be done in 1.3 multikey.

However, the guest still needs a way to indicate what slot to use for
its measurement report.

Jason

  reply	other threads:[~2026-11-09 13:47 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 15:26 [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 01/11] attestation: Restrict inherited operations per instance Aneesh Kumar K.V (Arm)
2026-10-30 13:29   ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 02/11] attestation: Filter evidence objects " Aneesh Kumar K.V (Arm)
2026-10-30 13:44   ` Jiri Pirko
2026-10-31  6:24     ` Aneesh Kumar K.V
2026-11-02 19:14       ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 03/11] attestation: Enter secure operation when evidence is accepted Aneesh Kumar K.V (Arm)
2026-10-30 13:51   ` Jiri Pirko
2026-10-30 15:36     ` Jason Gunthorpe
2026-10-31  4:09     ` Aneesh Kumar K.V
2026-11-02 11:28       ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 04/11] attestation: Bind object selection to accepted evidence snapshots Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 05/11] attestation: Make the evidence-get challenge attribute optional Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 06/11] PCI/TSM: Describe the PCI attestation control family Aneesh Kumar K.V (Arm)
2026-10-30 14:01   ` Jiri Pirko
2026-10-30 15:43     ` Jason Gunthorpe
2026-11-02 12:45       ` Jiri Pirko
2026-11-03 15:45         ` Jason Gunthorpe
2026-11-04  9:21           ` Jiri Pirko
2026-11-04 14:00             ` Jason Gunthorpe
2026-10-31  4:05     ` Aneesh Kumar K.V
2026-11-02 11:50       ` Jiri Pirko
2026-11-03 15:35       ` Jason Gunthorpe
2026-10-31  4:22     ` Aneesh Kumar K.V
2026-11-02 11:30       ` Jiri Pirko
2026-11-03 15:39       ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 07/11] attestation: Add attestation helpers for PCI/TSM integration Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 08/11] PCI/TSM: Bind CTLV attestation to connected and locked contexts Aneesh Kumar K.V (Arm)
2026-10-28 22:56   ` Dave Jiang
2026-10-29  5:30     ` Aneesh Kumar K.V
2026-10-29 12:41       ` Jason Gunthorpe
2026-10-30 14:04   ` Jiri Pirko
2026-10-30 14:08   ` Jiri Pirko
2026-10-30 15:39     ` Jason Gunthorpe
2026-11-02 12:11       ` Jiri Pirko
2026-11-03 15:41         ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 09/11] crypto/ccp: Defer SEV-TIO link setup until evidence acceptance Aneesh Kumar K.V (Arm)
2026-11-06  7:47   ` Alexey Kardashevskiy
2026-11-06 13:14     ` Aneesh Kumar K.V
2026-11-06 14:21       ` Jason Gunthorpe
2026-11-09 10:03       ` Alexey Kardashevskiy
2026-10-28 15:26 ` [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance Aneesh Kumar K.V (Arm)
2026-10-29 16:56   ` Dave Jiang
2026-10-29 17:10     ` Jason Gunthorpe
2026-10-30  9:58       ` Reshetova, Elena
2026-10-30 13:15         ` Jason Gunthorpe
2026-10-31  3:47           ` Aneesh Kumar K.V
2026-11-02 10:11             ` Reshetova, Elena
2026-11-02 17:26               ` Jason Gunthorpe
2026-11-03 12:01                 ` Reshetova, Elena
2026-11-03 15:16                   ` Jason Gunthorpe
2026-11-04  8:03                     ` Xu Yilun
2026-11-04  9:49                       ` Reshetova, Elena
2026-11-04 13:41                         ` Jason Gunthorpe
2026-11-04 16:54                           ` Dave Jiang
2026-11-06 15:53                             ` Dave Jiang
2026-11-06 19:30                               ` Jason Gunthorpe
2026-11-06 22:39                                 ` Dave Jiang
2026-11-08 18:33                                   ` Jason Gunthorpe
2026-11-09 10:55                                     ` Reshetova, Elena
2026-11-09 13:47                                       ` Jason Gunthorpe [this message]
2026-11-09 17:37                                     ` Dave Jiang
2026-11-09 18:53                                       ` Jason Gunthorpe
2026-11-09 20:54                                         ` Dave Jiang
2026-11-09 23:40                                           ` Jason Gunthorpe
2026-11-10 13:15                                             ` Reshetova, Elena
2026-11-10 14:20                                               ` Jason Gunthorpe
2026-11-11 13:09                                                 ` Reshetova, Elena
2026-11-10  1:40                                         ` Alistair
2026-11-10 15:07                                           ` Jason Gunthorpe
2026-11-10  5:32                                         ` Alexey Kardashevskiy
2026-11-10 12:52                                           ` Jason Gunthorpe
2026-11-11  9:03                                             ` Alexey Kardashevskiy
2026-11-10 20:07                               ` Jason Gunthorpe
2026-11-04  9:03                     ` Reshetova, Elena
2026-11-04 13:48                       ` Jason Gunthorpe
2026-11-06  8:24                     ` Aneesh Kumar K.V
2026-11-06 12:49                       ` Reshetova, Elena
2026-11-06 15:53                         ` Aneesh Kumar K.V
2026-11-06 18:54                           ` Jason Gunthorpe
2026-11-03 16:31                 ` Aneesh Kumar K.V
2026-11-03 17:56                   ` Jason Gunthorpe
2026-11-02 10:05           ` Reshetova, Elena
2026-11-02 10:22           ` Reshetova, Elena
2026-11-02 17:37             ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 11/11] virt: coco: arm-cca-guest: Refresh selected evidence against trusted digests Aneesh Kumar K.V (Arm)
2026-10-30 12:34 ` [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Xu Yilun
2026-10-30 15:32   ` Jason Gunthorpe

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=20261109134743.GM770409@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=aik@amd.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=ashish.kalra@amd.com \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=elena.reshetova@intel.com \
    --cc=jic23@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=john.allen@amd.com \
    --cc=kas@kernel.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=patches@lists.linux.dev \
    --cc=rick.p.edgecombe@intel.com \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=thomas.lendacky@amd.com \
    --cc=will@kernel.org \
    --cc=yilun.xu@linux.intel.com \
    /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