-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librbd: don't decay LUKS{1,2}EncryptionFormat into LUKSEncryptionFormat
Commit 9892ead ("librbd/crypto: allow loading luks format without specifying version") introduced RBD_ENCRYPTION_FORMAT_LUKS format identifier, matching cryptsetup's CRYPT_LUKS ("load any LUKS version happens to be there"). However, in an effort to enable an obscure "layered encryption with the same passphrase + old QEMU" use case, it also introduced decaying of RBD_ENCRYPTION_FORMAT_LUKS1 and RBD_ENCRYPTION_FORMAT_LUKS2 format identifiers, making it impossible to assert on the format that is being loaded. This new behavior was then extended to standalone images. Treating RBD_ENCRYPTION_FORMAT_LUKS1, RBD_ENCRYPTION_FORMAT_LUKS2 and RBD_ENCRYPTION_FORMAT_LUKS the same when loading encryption can be construed as an opening for a format downgrade attack. Let's resurrect the previous standalone images behavior and extend it to layered encryption instead. Signed-off-by: Ilya Dryomov <[email protected]>
- Loading branch information
Showing
7 changed files
with
337 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.