this post was submitted on 19 Oct 2023
52 points (93.3% liked)

Linux

48252 readers
722 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi everybody, bit of a warning here: The recovery key generated during the installation of Ubuntu 23.10 (if you select tpm-backed fde) cannot be used to unlock the disk outside of boot, as in any 'cryptsetup' command and so on will not accept the recovery key. unlocking when accessed from different system does not work etc.

You can use it to unlock the disk while booting if your tpm somehow fails, but ONLY in that specific situation.

I kind of purposefully broke my tpm keys to see if it could be restored with 23.10 and ended up having to reinstal, as I ended up having to enter the recovery key at boot every time and no way of adding additional unlock options to the volume, as cryptsetup would not accept the recovery key as passphrase.

This bug could be very bad for new users.

See this bug report: https://bugs.launchpad.net/ubuntu-desktop-installer/+bug/2039741

you are viewing a single comment's thread
view the rest of the comments
[–] MAFoElffen@lemmy.world 3 points 1 year ago (1 children)

Success! I have a working key file...

root@ubuntu:/home/ubuntu/Downloads# cryptsetup -v luksOpen /dev/sda3 luks-01 --key-file ./key-file.key
No usable token is available.
Warning: keyslot operation could fail as it requires more than available memory.
Key slot 1 unlocked.
Command successful.
root@ubuntu:/home/ubuntu/Downloads# cryptsetup -v luksOpen /dev/sda4 luks-02 --key-file ./key-file.key
No usable token is available.
Warning: keyslot operation could fail as it requires more than available memory.
Key slot 1 unlocked.
Command successful.

Success on the first volume, which I picked as first because it was only 53M in size. Mounted it to /mnt... And guess what I found inside it?

root@ubuntu:/home/ubuntu/Downloads# ls -l /mnt/device/private-keys-v1/
total 4
-rw------- 1 root root 2459 Oct 18 18:29 O8CbAEpnfm7jGKkMqnokmdMBlE1oV6Xma_bUNudlshDYPxE4aJNhbhiGnF360Ze4

That is a key, but not connected to either LUKS container there... I dumped the headers of both LUKS. There are 2 key-slots, and the key translated from the recovery key is in slot one of both containers, The second key-slot's key must be the TPM's key, which is unknown if that is stored anywhere except the TPM...

But is shouldn't matter now... Because that key-file did work to add a new passphrase to both LUKS containers.

Thank you @Skull giver.

[–] skullgiver@popplesburger.hilciferous.nl 2 points 1 year ago* (last edited 11 months ago)

[This comment has been deleted by an automated system]