diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-08-02 00:20:53 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-08-02 00:20:53 +0200 |
commit | ed1263bf8c6c678420eb1b9ad3f37d3a6d33af7c (patch) | |
tree | 14dfb134969574b7f0d869c455981418c652780e /src/Main/Forms | |
parent | 6121ca02397e75fe51b2c76111ef836556fedb49 (diff) | |
download | VeraCrypt-ed1263bf8c6c678420eb1b9ad3f37d3a6d33af7c.tar.gz VeraCrypt-ed1263bf8c6c678420eb1b9ad3f37d3a6d33af7c.zip |
Implement detection of volumes with vulnerable XTS master key.
If vulnerability detected, a warning message is displayed during mount or backup/restore header, and changing the password is disallowed since it will not change the master key.
Diffstat (limited to 'src/Main/Forms')
-rw-r--r-- | src/Main/Forms/ChangePasswordDialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp index 397ee693..39da8e60 100644 --- a/src/Main/Forms/ChangePasswordDialog.cpp +++ b/src/Main/Forms/ChangePasswordDialog.cpp @@ -171,6 +171,7 @@ namespace VeraCrypt RandomNumberGenerator::SetEnrichedByUserStatus (false); Gui->UserEnrichRandomPool (this, NewPasswordPanel->GetPkcs5Kdf() ? NewPasswordPanel->GetPkcs5Kdf()->GetHash() : shared_ptr <Hash>()); + bool masterKeyVulnerable = false; { #ifdef TC_UNIX // Temporarily take ownership of a device if the user is not an administrator @@ -193,6 +194,7 @@ namespace VeraCrypt CurrentPasswordPanel->GetPassword(), CurrentPasswordPanel->GetVolumePim(), CurrentPasswordPanel->GetPkcs5Kdf(), CurrentPasswordPanel->GetKeyfiles(), newPassword, newPim, newKeyfiles, NewPasswordPanel->GetPkcs5Kdf(), NewPasswordPanel->GetHeaderWipeCount(), Gui->GetPreferences().EMVSupportEnabled); Gui->ExecuteWaitThreadRoutine (this, &routine); + masterKeyVulnerable = routine.m_masterKeyVulnerable; } switch (DialogMode) @@ -214,6 +216,9 @@ namespace VeraCrypt throw ParameterIncorrect (SRC_POS); } + if (masterKeyVulnerable) + Gui->ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE"); + EndModal (wxID_OK); } catch (UnportablePassword &e) |