CVE-2021-4122: Medium severity libcryptsetup12 vulnerability
It was found that a specially crafted LUKS header could trick cryptsetup into disabling encryption during the recovery of the device. An attacker with physical access to the medium, such as a flash disk, could use this flaw to force a user into permanently disabling the encryption layer of that medium.
Other sources
There is a multi-step attack on LUKS2 format by orchestrating LUKS2 reencryption metadata in existing LUKS2 header.
An attacker is able to trigger permanent data decryption (ciphertext->plaintext transformation) on part of data device on next LUKS2 device activation. Attacker does not have to know passphrase or decrypted volume encryption key.
An attacker who can temporarily get physical access to an encrypted device (such as a flash drive encrypted with the LUKS2 format), could use this flaw in such a scenario : - secretly get the device and modify it with specially crafted headers - on subsequent decryption by a regular user, the code would "recover" the data, incidentally rewriting part of it in plain text - the attacker would then need to get access to the device again, in order to read the plaintext data - the attacker may optionally modify the plaintext, and/or modify again the header such that it would get re-encrypted again the next time the device is open. This would affect the integrity of the data and make the attack mostly silent (almost no trace of the attack on the disk)
cryptsetup versions older than 2.2.0 are not affected by this, because they do not support online LUKS2 reencryption.
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2021-4122 vulnerability?
CVE-2021-4122 is a vulnerability found in cryptsetup that allows an attacker with physical access to a device to disable encryption.
How does CVE-2021-4122 work?
A specially crafted LUKS header can trick cryptsetup into disabling encryption during device recovery.
What is the severity of CVE-2021-4122?
CVE-2021-4122 has a severity rating of medium with a CVSS score of 4.3.
Which software versions are affected by CVE-2021-4122?
Versions up to and including cryptsetup 2.3.7 and versions between 2.4.0 and 2.4.3 are affected.
How can I fix CVE-2021-4122?
Update cryptsetup to version 2.4.3 or 2.3.7 depending on the currently installed version.