Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Decrypting key for luks root partition fails with recent kernel/dracut
@ 2022-11-22 21:26 mithodin
  2022-11-23  1:30 ` sgn
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mithodin @ 2022-11-22 21:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

New issue by mithodin on void-packages repository

https://github.com/void-linux/void-packages/issues/40703

Description:
### Is this a new report?

Yes

### System Info

Void 5.19.10_1 x86_64 GenuineIntel uptodate rrFFFFFFFF

### Package(s) Affected

linux-6.0_1, dracut-053_5, gnupg-2.3.8_1

### Does a report exist for this bug with the project's home (upstream) and/or another distro?

_No response_

### Expected behaviour

gnupg is used at boot time to decrypt a key that is configured via the grub commandline with rd.luks.key to decrypt my root filesystem.

### Actual behaviour

The root filesystem fails to decrypt because the key file fails to decrypt.

### Steps to reproduce

1. Create a small partition holding a gpg-encrypted key file "root.key.gpg" for the root drive, which is luks encrypted
2. Put the private key capable of decrypting this key onto a yubikey.
3. Configure dracut to use this key at boot time via the grub commandline rd.luks.key=/root.key.gpg:UUID=<root fs UUID>
4. Add add_dracutmodules+=" crypt-gpg " to /etc/dracut.conf
5. Boot the computer with the yubikey plugged in

I have an initramfs with linux-5.19.10_1 where the process works fine. It used to work fine for many kernel versions, in fact. But starting with linux-5.19.15, the decryption fails. The root cause seems to be that gpg fails to decrypt the key file. On the rescue shell, I have confirmed that
 - gpg is able to access the yubikey (gpg --card-status lists it and gpg --edit-card shows the properties correctly)
 - gpg fails to decrypt the key file, giving only the message "unexpected error". Adding --verbose yields no additional information.

I'm at a loss where to go from here. I'm not even sure which of the involved components introduced the failure.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-25  8:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 21:26 [ISSUE] Decrypting key for luks root partition fails with recent kernel/dracut mithodin
2022-11-23  1:30 ` sgn
2022-11-23  7:07 ` mithodin
2022-11-24  1:18 ` sgn
2022-11-24  1:19 ` sgn
2022-11-25  7:48 ` mithodin
2022-11-25  8:03 ` classabbyamp
2022-11-25  8:54 ` mithodin
2022-11-25  8:54 ` [ISSUE] [CLOSED] " mithodin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).