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 2141380 - Move libcryptsetup-token-systemd-tpm2.so from 'devel' to 'udev' subpackage
Summary: Move libcryptsetup-token-systemd-tpm2.so from 'devel' to 'udev' subpackage
Keywords:
Status: CLOSED DUPLICATE of bug 2074833
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: systemd
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-09 16:38 UTC by Vitaly Kuznetsov
Modified: 2022-12-07 14:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-07 14:13:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-138863 0 None None None 2022-11-09 16:43:06 UTC

Internal Links: 2142102

Description Vitaly Kuznetsov 2022-11-09 16:38:33 UTC
systemd-cryptsetup volume unlock with a key sealed to TPM doesn't work by default:

# systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0 /dev/vdb2
New TPM2 token enrolled as key slot 0.
# /usr/lib/systemd/systemd-cryptsetup attach encroot /dev/vdb2 - tpm2-device=/dev/tpm0
Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/vdb2.
🔐 Please enter passphrase for disk encroot:

(no password request is expected at this point!)

and it isn't clear what's wrong. strace gives the answer:

2423  openat(AT_FDCWD, "/usr/lib64/cryptsetup/libcryptsetup-token-systemd-tpm2.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

the plugin is found in 'devel' subpackage and after installing it everything works as expected:

# /usr/lib/systemd/systemd-cryptsetup attach encroot /dev/vdb2 - tpm2-device=/dev/tpm0
# (no password request)

This library, however, has nothing to do with 'development', it's a normal production thing. Please consider moving it from '-devel' to '-udev' (where /usr/lib/systemd/systemd-cryptsetup is currently located)

P.S. Fedora seems to package cryptsetup tokens correctly, i.e:
$ rpm -qpl systemd-udev-251.8-586.fc37.aarch64.rpm  | grep cryptsetup-token
/usr/lib64/cryptsetup/libcryptsetup-token-systemd-fido2.so
/usr/lib64/cryptsetup/libcryptsetup-token-systemd-pkcs11.so
/usr/lib64/cryptsetup/libcryptsetup-token-systemd-tpm2.so

Comment 1 David Tardon 2022-11-10 13:31:03 UTC
Ack, this is a clear packaging bug.

Comment 2 David Tardon 2022-12-07 14:13:42 UTC

*** This bug has been marked as a duplicate of bug 2074833 ***


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