Skip to contentSkip to conversation

docs: security: Confidential computing intro and threat model for x86 virtualization

PATCH Superseded Carlos Bilbao 3 participants 4 messages Jul 11, 2023 – Aug 1, 2023

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 docs: security: Confidential computing intro and threat model for x86 virtualization

Kernel developers working on confidential computing for virtualized environments in x86 operate under a set of assumptions regarding the Linux kernel threat model that differs from the traditional view. Historically, the Linux threat model acknowledges attackers residing in userspace, as well as a limited set of external attackers that are able to interact with the kernel through networking or limited HW-specific exposed interfaces (e.g. USB, thunderbolt). The goal of this document is to explain additional attack vectors that arise in the virtualized confidential computing space and discuss the proposed protection mechanisms for the Linux kernel.

---

V2 can be found in:
https://lore.kernel.org/lkml/[email protected]/
Changes since V2:
- Remove pKVM from the document. Although there are clear overlaps in the threat models, it might be good to omit pKVM for now to avoid further complexity. In the future, when pKVM is more mature, we can revisit and discuss its inclusion.
- Change file name to "snp-tdx-threat-model.rst".
- Replace hyphens (dashes) for parenthesis in a parenthetical sentence.
- Change "technology specific" for "technology-specific".

V1 can be found in:
https://lore.kernel.org/lkml/[email protected]/
Changes since v1:

- Apply feedback from first version of the patch
- Clarify that the document applies only to a particular angle of confidential computing, namely confidential computing for virtualized environments. Also, state that the document is specific to x86 and that the main goal is to discuss the emerging threats.
- Change commit message and file name accordingly
- Replace AMD's link to AMD SEV SNP white paper
- Minor tweaking and clarifications

---
 Documentation/security/index.rst              |   1 +
 .../security/snp-tdx-threat-model.rst         | 294 ++++++++++++++++++
 MAINTAINERS                                   |   6 +
 3 files changed, 301 insertions(+)
 create mode 100644 Documentation/security/snp-tdx-threat-model.rst
Documentation/security/index.rst +1 -0
index 6ed8d2fa6f9e..7f04f5267fb3 100644
@@ -6,6 +6,7 @@ Security Documentation
    :maxdepth: 1
 
    credentials
+   snp-tdx-threat-model.rst
    IMA-templates
    keys/index
    lsm
Documentation/security/snp-tdx-threat-model.rst new file +294 -0

294 lines not on this page · raw message

MAINTAINERS +6 -0
index a73486c4aa6e..1d4ae60cdee9 100644
@@ -5197,6 +5197,12 @@ S:	Orphan
 W:	http://accessrunner.sourceforge.net/
 F:	drivers/usb/atm/cxacru.c
 
+CONFIDENTIAL COMPUTING THREAT MODEL FOR X86 VIRTUALIZATION (SNP/TDX)
+M:    Elena Reshetova <[email protected]>
+M:    Carlos Bilbao <[email protected]>
+S:    Maintained
+F:    Documentation/security/snp-tdx-threat-model.rst
+
 CONFIGFS
 M:	Joel Becker <[email protected]>
 M:	Christoph Hellwig <[email protected]>
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · Carlos Bilbao

Kernel developers working on confidential computing for virtualized environments in x86 operate under a set of assumptions regarding the Linux kernel threat model that differs from the traditional view. Historically, the Linux threat model acknowledges attackers residing in userspace, as well as a limited set of external attackers that are able to interact with the kernel through networking or limited HW-specific exposed interfaces (e.g. USB, thunderbolt). The goal of this document is to explain additional attack vectors that arise in the virtualized confidential computing space and discuss the proposed protection mechanisms for the Linux kernel.

When you have a "and" in a changelog text, that's a huge hint that it needs to be split up into multiple patches.

And that's the case here, you want to do two things, describe your crazy model of different attack vectors AND propose new ways to protect from them.

The "propose new ways" should be coming in ONLY with actual patches that do such a thing, as it's a useless document without that (we don't take proposed document updates without actual kernel changes that implement them for obvious reasons, nor would you want us to.)

So how about triming this down more to just the first part, where you all agree on a different threat model, and then you all can go of and propose different potential solutions to this newly designed threat model and we will be able to evaluate them based on working code, not just design documents.

thanks,

greg k-h

maintainer
#2 lore raw
Quoted 11 lines · Carlos Bilbao
Quoted 9 lines

Kernel developers working on confidential computing for virtualized environments in x86 operate under a set of assumptions regarding the Linux kernel threat model that differs from the traditional view. Historically, the Linux threat model acknowledges attackers residing in userspace, as well as a limited set of external attackers that are able to interact with the kernel through networking or limited HW-specific exposed interfaces (e.g. USB, thunderbolt). The goal of this document is to explain additional attack vectors that arise in the virtualized confidential computing space and discuss the proposed protection mechanisms for the Linux kernel.

Quoted 6 lines

When you have a "and" in a changelog text, that's a huge hint that it needs to be split up into multiple patches.

And that's the case here, you want to do two things, describe your crazy model of different attack vectors AND propose new ways to protect from them.

Actually if you read the full doc we are not proposing *yet* any *concrete* new mechanisms of protecting against these attack vectors that would require kernel patches. These are indeed going to come later with the code changes as you highlight below. What we *do* discuss below is high-level mitigation strategies that wont make sense to include in the actual patches, because some of these mitigations wont need *any* new patches to linux. For example, the first attack we have is " Guest malicious configuration", where the misbehaving host modifies one of the guest's configuration (kernel binary, command line, etc). The general mitigation for this attack vector is a way to authenticate/attest this configuration and it is mostly transparent for the kernel. So, we either need to drop this attack description fully form the doc (and this would result in questions from people not familiar with CoCo: why do you try to harden the kernel apis when you don’t describe how kernel binary integrity is protected), or we leave it in for an overall picture to provide context and justify the overall reasoning.

That said we can rewrite the sentence that you commented upon not to create confusion (I do agree it can be misinterpreted the way you pointed out):

"The goal of this document is to explain additional
attack vectors that arise in the virtualized confidential computing space, as well as highlight the overall mitigation strategies that can used to address them.
The concrete mechanisms, if determined needed for Linux,
will be described in the future extensions of this document, together with the code that implements them".

Does this address your concern?

Best Regards,
Elena

#3 lore raw

Hello everyone,

Quoted 45 lines · Elena
Quoted 11 lines · Carlos Bilbao
Quoted 9 lines

Kernel developers working on confidential computing for virtualized environments in x86 operate under a set of assumptions regarding the Linux kernel threat model that differs from the traditional view. Historically, the Linux threat model acknowledges attackers residing in userspace, as well as a limited set of external attackers that are able to interact with the kernel through networking or limited HW-specific exposed interfaces (e.g. USB, thunderbolt). The goal of this document is to explain additional attack vectors that arise in the virtualized confidential computing space and discuss the proposed protection mechanisms for the Linux kernel.

Quoted 6 lines

When you have a "and" in a changelog text, that's a huge hint that it needs to be split up into multiple patches.

And that's the case here, you want to do two things, describe your crazy model of different attack vectors AND propose new ways to protect from them.

Actually if you read the full doc we are not proposing *yet* any *concrete* new mechanisms of protecting against these attack vectors that would require kernel patches. These are indeed going to come later with the code changes as you highlight below. What we *do* discuss below is high-level mitigation strategies that wont make sense to include in the actual patches, because some of these mitigations wont need *any* new patches to linux. For example, the first attack we have is " Guest malicious configuration", where the misbehaving host modifies one of the guest's configuration (kernel binary, command line, etc). The general mitigation for this attack vector is a way to authenticate/attest this configuration and it is mostly transparent for the kernel. So, we either need to drop this attack description fully form the doc (and this would result in questions from people not familiar with CoCo: why do you try to harden the kernel apis when you don’t describe how kernel binary integrity is protected), or we leave it in for an overall picture to provide context and justify the overall reasoning.

That said we can rewrite the sentence that you commented upon not to create confusion (I do agree it can be misinterpreted the way you pointed out):

"The goal of this document is to explain additional
attack vectors that arise in the virtualized confidential computing space, as well as highlight the overall mitigation strategies that can used to address them.
The concrete mechanisms, if determined needed for Linux,
will be described in the future extensions of this document, together with the code that implements them".

Quoted 1 line

Does this address your concern?

I'm writing to re-ping the email thread and kindly request any additional comments or feedback from the list.

The issue that Greg raises is whether we should discuss and cover high-level mitigation strategies _before_ we start pushing code.

In addition to Elena's response, I would like to point out that a document that explains our agreements on the high-level mitigation strategies would serve as reference when the time comes to discuss concrete code mitigation strategies. Saidd foundation would avoid explanations and repetitive discussions whenever the code arrives. More importantly, it would relieve the individual confidential computing contributors from the burden of discussing the rationale behind their solution all the way down to the very basic ideas of confidential computing within our context.

Greg, I would like to know if Elena's reasoning has addressed your concerns. If you still have concerns/doubts with this approach, please do let us know.

Quoted 3 lines

Best Regards,
Elena

Thanks,
Carlos