Decryption through LUKS2 reencryption crash recovery
seclists.org
seclists.org
-
Since the protocol used here is broken the fix is to change the protocol - so keep in mind that...
> The former reencryption operation (without the additional digest) is no longer supported (reencryption with the digest is not backward compatible). You need to finish in-progress reencryption before updating to new packages. The alternative approach is to perform a repair command from the updated package to recalculate reencryption digest and fix metadata.
Just in case you were thinking about upgrading the software during re-encryption - don't.
Some background information https://arxiv.org/abs/1807.00309
There is also old presentation, which explicitly refers to protecting against "returned disk" scenario: https://archive.fosdem.org/2018/schedule/event/cryptsetup/at...
You'd expect such a critical software had necessary failsafe mechanisms around that.
So a legitimate user does have to decrypt it in the middle, but you don't need to control what they do or access it the same time they do.
Good 'evil maid' mitigations should be sufficient here too, like encrypting at the SSD level with a boot password.
However I do wonder if this bypasses secure boot checks as I doubt the Luks header is signed. That's normally an evil maid mitigation but I don't think it'll suffice here.
It as fixed bug, and a plausible scenario is if someone wants to decrypt a LUKS2 (in and old linux kernel system) which is auto unlocked by a TPM like device.
how's the TPM ecosystem on linux like? On windows bitlocker, it mostly just works, but IIRC on linux you had to jump through a bunch of hoops to get everything configured.
I mean, unless there's a deliberate backdoor, any half-competent drive encryption implementation will require a passphrase or key to decrypt.
it requires you to:
1. mess with a device
2. and then the device to be used (with the proper password)
3. and then you having access to it again
At lest that, for certain attacks maybe multiple iterations of this, not sure.
So it's not braking the main security model: Device Theft = Data Theft protection.
Since it's optional, is it possible to see if this is enabled or disabled, and how to disable it?
First time I'm glad grub cannot boot LUKS2.
Argon2id (cryptsetup default) and Argon2i PBKDFs are not supported, only PBKDF2 is.
grub-install does not support creating a core image that could be used for unlocking LUKS2.
Also I sometimes use LUKS on top of a LAN network share such as Samba, but I don’t recommend this either.
XTS mode and lack of authentication used in disk encryption are drawbacks.
> The attack is not applicable to LUKS1 format, but the attacker can update metadata in place to LUKS2 format as an additional step.
In a current one or patched one, is more likely to have a non-vulnerable LUKS2 volume that you can not downgrade to a vulnerable one, or a kernel and userspace tools non-vulnerable to the metadata manipulation even for a LUKS1 volume.
I concede the plausible scenario of replacing the kernel to a vulnerable one, if you ha access to the drive (by external OS boot or get the hardware) and replacing the kernel on the usually unencrypted boot partition along modifying the LUKS2 metadata of the encrypted volume. Not a quick local or remote feat to do. Not doable on an encrypted boot volume or signed boot files (secure boot thingy). Sincerely, if you have that kind of access, it is easier to modify the initramfs file to grab the LUKS key.
Ubuntu 21.10 Needed
Ubuntu 21.04 Ignored (reached end-of-life)
Ubuntu 20.04 Needed
Ubuntu 18.04 Not vulnerable (code not present)
[1] https://ubuntu.com/security/CVE-2021-4122If the contents of the boot partition are unsigned there are probably easier attacks available. You could, for instance, deploy a kernel with crafted reencryption logic baked in over the default boot kernel. That wouldn't require this vulnerability, because the victim will be typing the passphrase into the attacker's (unprotected) kernel from /boot.