RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1754906 - Disabling TPM measurements & usage
Summary: Disabling TPM measurements & usage
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: grub2
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Bootloader engineering team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1734505
TreeView+ depends on / blocked
 
Reported: 2019-09-24 10:55 UTC by Marc-Andre Lureau
Modified: 2023-10-06 18:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-08 13:49:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marc-Andre Lureau 2019-09-24 10:55:00 UTC
RHEL8 grub2 does TPM measurement, and will update TPM PCR 8 & 9 registers.

In bug 1734505, the customer is trying to pass through a TPM device to QEMU Windows VM with bitlocker.

Unfortunately, bitlocker requires a set of PCR registers to be untouched/0 during boot (even though the group policy settings allows to uncheck those PCR for sealing).

The current solution so far is to use a custom grub build with TPM support removed.

Could this be an install-time or mkconfig option instead? (What are the security implications?)

What would be the support for a custom-build grub with TPM measurements removed?

Is there other solutions?

thanks

Comment 1 Peter Jones 2020-01-21 17:18:41 UTC
Fundamentally here, the issue is that in the TCG TPM implementation specs, PCRs 8-15 are "Defined for use by the Static OS", and Linux and Windows have, reasonably, chosen different things to use them for.  This makes using TPM passthrough challenging.

Regarding grub's usage specifically, we're using 8 and 9 to measure the bootloader configuration and kernel command line (8), and the kernel and initramfs being booted (9).  Because this is boot information, and we're merely creating records for something to use later, it's not like the BitLocker use case, but rather the same reason bootmgr is still extending them[0] even if you change the group policy for BitLocker. we definitely can't make changing them be an install-time or configuration option - that creates several bad scenarios:

1) anything that has hard-coded the PCR they're sealing against accidentally seals against an uninitialized PCR
2) anything that doesn't have them hard-coded now has to look up which ones to seal against, which creates a race condition where an attacker can cause the producer and consumer to believe different sets of PCRs are in use.  This potentially leads to encrypting with an attacker's key, or doing attestation with a PCR that only the attacker has ever extended anything into.

Making this configurable either at runtime or during the build opens you up to these problems if the attacker is present in the right time frame during initial provisioning or any recovery procedure, and we can't change that for just one customer who needs it; it poisons the well for everyone.  That said, IMA using PCR 10 is configurable at kernel build time, so possibly that is more flexible[1], but I don't think there's a reasonable way to get around 8 and 9 being used for cross purposes by each OS.

I really think the only answer here is to use swtpm to provide the guest TPM, and use IMA and/or LUKS to secure the swtpm data, instead of trying to do pass-through.

[0] as noted here: https://bugzilla.redhat.com/show_bug.cgi?id=1734505#c51
[1] Incidentally, I'm still not sure why PCR 12 is changing in https://bugzilla.redhat.com/show_bug.cgi?id=1734505#c41 , especially as https://docs.microsoft.com/en-us/windows/security/information-protection/bitlocker/bitlocker-group-policy-settings makes no mention of it.


Note You need to log in before you can comment on or make changes to this bug.