Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPM Encryption does not fail if secureboot is not enabled #8995

Closed
danacr opened this issue Jul 9, 2024 · 3 comments · Fixed by #9005
Closed

TPM Encryption does not fail if secureboot is not enabled #8995

danacr opened this issue Jul 9, 2024 · 3 comments · Fixed by #9005
Assignees

Comments

@danacr
Copy link

danacr commented Jul 9, 2024

Bug Report

Description

If the host machine has secureboot disabled, but the TPM available, Talos proceeds to install. There is no way to restrict the encryption. An attacker could boot an alternate OS and retrieve the encryption keys.

It would be great to have an additional config parameter in the tpm encryption requiring secure boot to be enabled, else disk encryption fails.

@steverfrancis
Copy link
Collaborator

An alternate OS could not retrieve the encryption keys from the TPM (an attacker modifying the firmware, or bootloader, or decryption tool (or analogues in e.g. an embedded device without a full OS) - whether directly, or by booting from a different boot device / program - will mean the PCRs don't have the same value and render the decryption key unavailable) - but the point of this ticket is to provide a configurable mechanism to ensure that SecureBoot is enabled whenever TPM encryption is enabled.

@smira smira self-assigned this Jul 11, 2024
smira added a commit to smira/talos that referenced this issue Jul 11, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@runningman84
Copy link

But there is some other issue if for some reason secure boot was not enabled but the disk still got encrypted… if you notice the error and activate secure boot you cannot read the data afterwards anymore.

smira added a commit to smira/talos that referenced this issue Jul 11, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@steverfrancis
Copy link
Collaborator

From slack, goal is a Talos configuration option in the config file that checks that SecureBoot is enabled, and if it is not, the system will do ... something

  • fail to apply the config (and stay in maintenance mode)
  • revert to maintenance mode
  • boot loop
  • or something else that makes it evident that the system is "not healthy"

smira added a commit to smira/talos that referenced this issue Jul 22, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit cf5effa)
smira added a commit to smira/talos that referenced this issue Aug 5, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit cf5effa)
smira added a commit to smira/talos that referenced this issue Aug 6, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit cf5effa)
smira added a commit to smira/talos that referenced this issue Aug 6, 2024
Fixes siderolabs#8995

There is no security impact, as the actual SecureBoot
state/configuration is measured into the PCR 7 and the disk encryption
key unsealing is tied to this value.

This is more to provide a way to avoid accidentally encrypting to the
TPM while SecureBoot is not enabled.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit cf5effa)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants