Github messages for voidlinux
 help / color / mirror / Atom feed
From: mithodin <mithodin@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] Decrypting key for luks root partition fails with recent kernel/dracut
Date: Fri, 25 Nov 2022 09:54:14 +0100	[thread overview]
Message-ID: <20221125085414.pneDi7F_O1pq2uAjETE0FQ_tsSOmnWAV8ZvCQaH9Rzk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40703@inbox.vuxu.org>

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

Closed 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.

      parent reply	other threads:[~2022-11-25  8:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 21:26 [ISSUE] " 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 ` mithodin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221125085414.pneDi7F_O1pq2uAjETE0FQ_tsSOmnWAV8ZvCQaH9Rzk@z \
    --to=mithodin@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).