| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/edgelesssys/constellation/v2 | go | <= 2.23.1 | 2.24.0 |
The vulnerability lies in the insecure handling of LUKS2 volumes, where a crafted volume with a malicious header could be opened by a guest, leading to data compromise. The root cause was the lack of validation of the LUKS2 header before its use, specifically allowing insecure cipher algorithms like cipher_null-ecb.
The patch addresses this by introducing a 'detached header' mechanism. Before opening a device, the LUKS2 header is now copied into a separate file, and a loopback device is created for it. This detached header is then parsed and rigorously verified by the newly added verifyLUKS2Header function in internal/cryptsetup/cryptsetup_cgo.go. This function checks various fields in the header metadata, including the encryption algorithm, key size, KDF, and more, to ensure they conform to expected secure values. Only after successful verification is the actual device opened using the verified header.
The primary vulnerable functions identified are internal/cryptsetup.CryptSetup.Init and internal/cryptsetup.CryptSetup.InitByName, as they are the public API endpoints in the cryptsetup package that were modified to incorporate this new secure initialization flow. Before the patch, these functions would proceed with device initialization without any header validation.
Additionally, cryptmapper.cryptMapper.OpenCryptDevice is identified as a key runtime indicator. As mentioned in the security advisory, this is the higher-level function that calls the vulnerable Init function, making it a crucial part of the exploitation path. Any runtime profile of the exploitation would likely show a call to OpenCryptDevice followed by Init.
internal/cryptsetup.CryptSetup.Initinternal/cryptsetup/cryptsetup.go
internal/cryptsetup.CryptSetup.InitByNameinternal/cryptsetup/cryptsetup.go
cryptmapper.cryptMapper.OpenCryptDevicecsi/cryptmapper/cryptmapper.go
internal/cryptsetup.verifyLUKS2Headerinternal/cryptsetup/cryptsetup_cgo.go
Ongoing coverage of React2Shell