Activity log for bug #2073429

Date Who What changed Old value New value Message
2024-07-17 21:38:42 Kyler Hornor bug added bug
2024-07-17 21:39:08 Kyler Hornor nominated for series Ubuntu Jammy
2024-07-17 21:39:08 Kyler Hornor bug task added clevis (Ubuntu Jammy)
2024-07-17 22:28:08 Kyler Hornor attachment added luks.patch https://bugs.launchpad.net/ubuntu/jammy/+source/clevis/+bug/2073429/+attachment/5798147/+files/luks.patch
2024-07-18 00:25:07 Ubuntu Foundations Team Bug Bot tags patch
2024-07-18 00:25:14 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Review Team
2024-07-24 12:16:09 Ghadi Rahme description Hello, clevis released with version 18 on jammy (22.04). For reasons that are a bit beyond me, the cryptsetup call inside of clevis creates keyslots using argon2id as the pbkdf. While most folks would say this is preferable, NIST still has not approved it and it is thus incompatible with fips 140-3 at this time. Oddly enough, there was an upstream commit that was implemented to help with an OOM condition that accidentally forced pbkdf2 rather than argon2id. Commit found here: https://github.com/latchset/clevis/commit/71596307516ce2367e6303bd7f7ae7b180b29a35 Ideally, we need to either just bring that commit back to the jammy version, or get to the root cause of why cryptsetup in that exact scenario prefers argon2id. Thank you @kylerhornor for the original bug report [impact] current version of clevis on jammy uses argon2id instead of pbkdf2 for the encryption algorithm which is not approved by the NIST. An upstream commit (https://github.com/latchset/clevis/commit/71596307516ce2367e6303bd7f7ae7b180b29a35) did make clevis use pbkdf2 instead of argon2id to avoid OOM scenarios on systems with constrained memory. So this fix also resolves this issue on jammy. Noble currently has that fix. Although argon2id is considered more secure, the maintainer has confirmed that currently the entropy used by clevis is high enough to the point where pbkdf2 is considered secure enough to replace argon2id. Please refer to comment #5 on this links for the maintainers' response: https://bugzilla.redhat.com/show_bug.cgi?id=1979256 Also the bugzilla thread above is a good read for anyone interested in knowing more about why this change was made. [Test Plan] This test plan was done on a libvirt/kvm virtual machine. 1. setup a jammy VM. Attach to it a tpm2 module (software or pass-through) and an extra drive. 2. install clevis, clevis-tpm2 and clevis-luks: $ sudo apt install clevis clevis-tpm2 clevis-luks 3. using lsblk note the name of the extra drive that was attached to the VM. In this case vdb will be used as an example 4. run the following commands to setup partitions on the drive: $ sudo parted /dev/vdb -- mklabel gpt $ sudo parted /dev/vdb -- mkpart primary 0% 100% 5. setup luks and open the drive: $ sudo cryptsetup luksFormat /dev/vdb1 $ sudo cryptsetup luksOpen /dev/vdb1 <name> replace <name> with a name of your choosing also note how vdb1 is used in this step instead of vdb since we are formatting the partition created in step 4. Verify these values on your system before running the commands. 6. finally bind the drive with clevis using tpm2: $ sudo clevis luks bind -d /dev/vdb1 tpm2 '{"hash":"sha256","key":"rsa","pcr_bank":"sha256","pcr_ids":"6"}' 7. Verify the encryption algorithm being used: sudo cryptsetup luksDump /dev/vdb1 | grep PBKDF: Currently this will show as argon2id but after applying the patch I backported from upstream and repeating step 6 it should show pbkdf2 in the new keyslot [where problems could occur] * The machine could fail to create the new keyslot * Although the maintainer says that the entropy is high enough for pbkdf2 to be secure it might not be as secure still as argon2id even tho it is NIST compliant. [Original Description] Hello, clevis released with version 18 on jammy (22.04). For reasons that are a bit beyond me, the cryptsetup call inside of clevis creates keyslots using argon2id as the pbkdf. While most folks would say this is preferable, NIST still has not approved it and it is thus incompatible with fips 140-3 at this time. Oddly enough, there was an upstream commit that was implemented to help with an OOM condition that accidentally forced pbkdf2 rather than argon2id. Commit found here: https://github.com/latchset/clevis/commit/71596307516ce2367e6303bd7f7ae7b180b29a35 Ideally, we need to either just bring that commit back to the jammy version, or get to the root cause of why cryptsetup in that exact scenario prefers argon2id.
2024-07-24 12:16:15 Ghadi Rahme clevis (Ubuntu Jammy): assignee Ghadi Rahme (ghadi-rahme)
2024-07-24 12:16:19 Ghadi Rahme clevis (Ubuntu Jammy): importance Undecided High
2024-07-24 12:17:14 Ghadi Rahme attachment added clevis-jammy.debdiff https://bugs.launchpad.net/ubuntu/+source/clevis/+bug/2073429/+attachment/5799967/+files/clevis-jammy.debdiff
2024-07-24 12:17:51 Ghadi Rahme clevis (Ubuntu Jammy): status New In Progress
2024-07-24 12:18:10 Ghadi Rahme bug added subscriber Ubuntu Sponsors