mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-20 03:25:03 -05:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user