Typing passphrase pretty quickly using Yubikey fails to unlock a LUKS partition

Bug #2051478 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Plymouth
Fix Released
Unknown
cryptsetup (Ubuntu)
Invalid
Undecided
Unassigned
plymouth (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It looks like there are some behavioral changes between 22.02.122 and 23.360.11. I didn't have any issue until recently but after upgrading to 23.360.11 on Ubuntu, the same unlocking method of LUKS partition stopped working.

How to reproduce:
1. format Yubikey with a static password
```
$ ykman otp static --generate 2
```
(it will emit 38 characters and the ENTER event within a moment when a button is long pressed)

2. add the new key to LUKS
```
$ sudo cryptsetup luksAddKey /dev/nvme0n1p3
```

3. reboot and use the Yubikey to input the passphrase

Actual:
it fails to unlock

When typing the same passphrase by-hand it works. Furthermore, when not using Plymouth, both by-hand typing and Yubikey work.

WORKAROUND:
1. boot into the recovery mode
2. unlock the volume in the console
3. remove "splash" from /etc/default/grub and run `update-grub`
3. reboot

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: cryptsetup 2:2.6.1-6ubuntu1
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Jan 29 15:41:03 2024
InstallationDate: Installed on 2024-01-08 (21 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240104)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
cmdline: BOOT_IMAGE=/vmlinuz-6.6.0-14-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro quiet splash
crypttab: dm_crypt-0 UUID=cfd8c295-9988-4934-a91a-460a9d16d80f none luks

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

/var/log/apt/history.log for the record.

Nobuto Murata (nobuto)
description: updated
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in cryptsetup (Ubuntu):
status: New → Invalid
Nobuto Murata (nobuto)
description: updated
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Check /var/crash and the system log in case it's plymouthd that's crashed (like bug 2050743).

Revision history for this message
Nobuto Murata (nobuto) wrote :

There was no crash. Trying 24.004.60 was suggested in the upstream report so I was trying to rebuild Plymouth from Debian unstable but it failed so I'm planning to install Debian packages as is for quicker testing.

Revision history for this message
Nobuto Murata (nobuto) wrote :

It's not reproducible with forcibly installed Debian's 24.004.60-1. So I assume that the next merge from Debian will make the issue go away.

plymouth | 0.9.4-1.1 | oldoldstable | source
plymouth | 0.9.5-3 | oldstable | source
plymouth | 22.02.122-3 | stable | source
plymouth | 24.004.60-1 | testing | source
plymouth | 24.004.60-1 | unstable | source
plymouth | 24.004.60-1 | unstable-debug | source

summary: - unlock passphrase doesn't work in plymouth but works in recovery mode
+ Typing passphrase pretty quickly using Yubikey fails to unlock a LUKS
+ partition
description: updated
Revision history for this message
Nobuto Murata (nobuto) wrote :

Another feedback from the upstream report:

https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/243#note_2262321
> That makes it easy, it is missing /usr/share/X11/xkb , the initrd script that ships with Plymouth was updated for it https://gitlab.freedesktop.org/plymouth/plymouth/-/blob/main/scripts/plymouth-populate-initrd.in?ref_type=heads#L477
> Looking at https://git.launchpad.net/ubuntu/+source/plymouth/tree/debian/local/plymouth.hook it doesn't seem the hook was updated yet to copy it. I think either Debian or Ubuntu need to update that though

Changed in plymouth:
status: Unknown → New
Revision history for this message
Nobuto Murata (nobuto) wrote :

This is supposed to be fixed by merging 24.004.60-1 from Debian or backporting a specific patch or more that was pointed out in the upstream:
https://gitlab.freedesktop.org/plymouth/plymouth/-/commit/6e411c7dcb77b69d7d4e897f6a5676f8bfb1c516
> (...)
> That leads to keystrokes getting eaten.
>
> This commit makes the terminal more careful about setting the
> keyboard mode. It now only changes it when plymouth thinks its
> necessary to do so.

Changed in plymouth:
status: New → Fix Released
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in plymouth (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.