mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06: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:
@@ -652,6 +652,7 @@ namespace VeraCrypt
|
||||
|
||||
bool protectedVolumeMounted = false;
|
||||
bool legacyVolumeMounted = false;
|
||||
bool vulnerableVolumeMounted = false;
|
||||
|
||||
foreach_ref (const HostDevice &device, devices)
|
||||
{
|
||||
@@ -694,6 +695,10 @@ namespace VeraCrypt
|
||||
|
||||
if (newMountedVolumes.back()->EncryptionAlgorithmMinBlockSize == 8)
|
||||
legacyVolumeMounted = true;
|
||||
|
||||
if (newMountedVolumes.back()->MasterKeyVulnerable)
|
||||
vulnerableVolumeMounted = true;
|
||||
|
||||
}
|
||||
catch (DriverError&) { }
|
||||
catch (MissingVolumeData&) { }
|
||||
@@ -708,6 +713,9 @@ namespace VeraCrypt
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vulnerableVolumeMounted)
|
||||
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
|
||||
|
||||
if (someVolumesShared)
|
||||
ShowWarning ("DEVICE_IN_USE_INFO");
|
||||
|
||||
@@ -741,10 +749,12 @@ namespace VeraCrypt
|
||||
|
||||
favorite.ToMountOptions (options);
|
||||
|
||||
bool mountPerformed = false;
|
||||
if (Preferences.NonInteractive)
|
||||
{
|
||||
BusyScope busy (this);
|
||||
newMountedVolumes.push_back (Core->MountVolume (options));
|
||||
mountPerformed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -752,6 +762,7 @@ namespace VeraCrypt
|
||||
{
|
||||
BusyScope busy (this);
|
||||
newMountedVolumes.push_back (Core->MountVolume (options));
|
||||
mountPerformed = true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -769,6 +780,9 @@ namespace VeraCrypt
|
||||
newMountedVolumes.push_back (volume);
|
||||
}
|
||||
}
|
||||
|
||||
if (mountPerformed && newMountedVolumes.back()->MasterKeyVulnerable)
|
||||
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
|
||||
}
|
||||
|
||||
if (!newMountedVolumes.empty() && GetPreferences().CloseSecurityTokenSessionsAfterMount)
|
||||
@@ -805,6 +819,9 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
if (volume->MasterKeyVulnerable)
|
||||
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
|
||||
|
||||
if (volume->EncryptionAlgorithmMinBlockSize == 8)
|
||||
ShowWarning ("WARN_64_BIT_BLOCK_CIPHER");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user