← Lab /Security & privacy

LUKS2 null-cipher flaw lets attackers read and modify confidential VM disks

A malicious actor with write access to LUKS2-encrypted disks can extract all data and arbitrarily modify the contents of confidential virtual machines by exploiting malleable metadata that enables a null cipher.

Security & privacy Trail of Bits 30 Oct 2025 Disclosure Real-world evidence

Published as “Vulnerabilities in LUKS2 disk encryption for confidential VMs”

Why it matters

Confidential VM deployments that rely on LUKS2 must update cryptsetup and validate disk headers, otherwise an attacker with disk write access can fully compromise data confidentiality and integrity.

Summary

Trail of Bits discovered that LUKS2 metadata can be altered to specify a null cipher, causing the VM to treat the disk as unencrypted. The issue affects eight confidential-computing frameworks that rely on AMD SEV-SNP or Intel TDX. Cryptsetup 2.8.1 was updated to reject null ciphers in keyslots, and the affected projects released patches using MAC verification or JSON validation. The evidence is based on real-world code reviews and coordinated disclosures, but no wild exploitation has been observed.

What they found 2

  1. An attacker with disk write access can extract and modify all data on a confidential VM by forcing a null cipher in the LUKS2 header.

    “Using these vulnerabilities, a malicious actor with access to storage disks can extract all confidential data stored on that disk and can modify the contents of the disk arbitrarily.”

  2. Cryptsetup 2.8.1 now rejects null ciphers as keyslot ciphers when a non-empty password is used.

    “In cryptsetup 2.8.1 and higher, null ciphers are now rejected as keyslot ciphers when used with a nonempty password.”

Caveats 5

  • We do not have any indication that this issue has been exploited in the wild.
  • cryptsetup maintainers warned that LUKS is not intended to provide integrity in this setting.
  • Exploitation of this issue requires write access to encrypted disks.
  • The Confidential Containers team noted that the persistent storage feature is still in development and the feedback will be incorporated as the implementation matures.
  • Null ciphers remain in cryptsetup 2.8.1 as a valid option for volume keys.

What’s new here 4

  • Identification of a null-cipher misuse in LUKS2 metadata that bypasses encryption for confidential VMs.
  • Demonstration of the flaw across eight different confidential-computing frameworks.
  • Partial mitigation added to cryptsetup 2.8.1 rejecting null ciphers in keyslots.
  • Recommendations for header integrity protection via MACs, JSON validation, and attestation.

In the news