CVE-2021-4122: Medium severity libcryptsetup12 vulnerability

Published Dec 14, 2021
·
Updated

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

4 affected componentsFixes available
redhat/cryptsetup<2.4.3
2.4.3
redhat/cryptsetup<2.3.7
2.3.7
Cryptsetup Project Cryptsetup<2.3.7
Cryptsetup Project Cryptsetup>=2.4.0<2.4.3

Event History

Aug 24, 2022
CVE Published
via MITRE·03:08 PM
Data Sourced
via MITRE·03:08 PM
DescriptionWeakness

Frequently Asked Questions

1

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.

2

How does CVE-2021-4122 work?

A specially crafted LUKS header can trick cryptsetup into disabling encryption during device recovery.

3

What is the severity of CVE-2021-4122?

CVE-2021-4122 has a severity rating of medium with a CVSS score of 4.3.

4

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.

5

How can I fix CVE-2021-4122?

Update cryptsetup to version 2.4.3 or 2.3.7 depending on the currently installed version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203