Skip to content

Commit

Permalink
Implement detection of volumes with vulnerable XTS master key.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
idrassi committed Aug 1, 2024
1 parent 6121ca0 commit ed1263b
Show file tree
Hide file tree
Showing 24 changed files with 186 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/Common/Apidrvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ typedef struct
ULONG MaximumTransferLength;
ULONG MaximumPhysicalPages;
ULONG AlignmentMask;
BOOL VolumeMasterKeyVulnerable;
} MOUNT_STRUCT;

typedef struct
Expand Down Expand Up @@ -316,6 +317,8 @@ typedef struct
// is read-only (or mounted an outer/normal TrueCrypt volume as read only)
uint32 HiddenSysLeakProtectionCount;

BOOL MasterKeyVulnerable;

} BootEncryptionStatus;


Expand Down
5 changes: 5 additions & 0 deletions src/Common/BootEncryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,7 @@ namespace VeraCrypt
/* IMPORTANT: Do NOT add any potentially time-consuming operations to this function. */

BootEncryptionStatus status;
memset (&status, 0, sizeof(status));
CallDriver (TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS, NULL, 0, &status, sizeof (status));
return status;
}
Expand Down Expand Up @@ -5401,6 +5402,10 @@ namespace VeraCrypt
int status = ReadVolumeHeader (!encStatus.HiddenSystem, header, oldPassword, old_pkcs5, old_pim, &cryptoInfo, NULL);
finally_do_arg (PCRYPTO_INFO, cryptoInfo, { if (finally_arg) crypto_close (finally_arg); });

// if the XTS master key is vulnerable, return error and do not allow the user to change the password since the master key will not be changed
if (cryptoInfo->bVulnerableMasterKey)
status = ERR_SYSENC_XTS_MASTERKEY_VULNERABLE;

if (status != 0)
{
handleError (hwndDlg, status, SRC_POS);
Expand Down
2 changes: 2 additions & 0 deletions src/Common/Crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ typedef struct CRYPTO_INFO_t

uint32 SectorSize;

BOOL bVulnerableMasterKey; // TRUE if XTS primary key is identical to secondary key (i.e. the volume is vulnerable to attack on XTS mode)

#endif // !TC_WINDOWS_BOOT

UINT64_STRUCT VolumeSize;
Expand Down
14 changes: 14 additions & 0 deletions src/Common/Dlgcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5577,6 +5577,14 @@ void handleError (HWND hwndDlg, int code, const char* srcPos)
break;
#endif

case ERR_XTS_MASTERKEY_VULNERABLE:
MessageBoxW (hwndDlg, AppendSrcPos (GetString ("ERR_XTS_MASTERKEY_VULNERABLE"), srcPos).c_str(), lpszTitle, ICON_HAND);
break;

case ERR_SYSENC_XTS_MASTERKEY_VULNERABLE:
MessageBoxW (hwndDlg, AppendSrcPos (GetString ("ERR_SYSENC_XTS_MASTERKEY_VULNERABLE"), srcPos).c_str(), lpszTitle, ICON_HAND);
break;

default:
StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("ERR_UNKNOWN"), code);
MessageBoxW (hwndDlg, AppendSrcPos (szTmp, srcPos).c_str(), lpszTitle, ICON_HAND);
Expand Down Expand Up @@ -8953,6 +8961,12 @@ int MountVolume (HWND hwndDlg,

LastMountedVolumeDirty = mount.FilesystemDirty;

if (mount.VolumeMasterKeyVulnerable
&& !Silent)
{
Warning ("ERR_XTS_MASTERKEY_VULNERABLE", hwndDlg);
}

if (mount.FilesystemDirty)
{
wchar_t msg[1024];
Expand Down
3 changes: 3 additions & 0 deletions src/Common/Language.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,9 @@
<entry lang="en" key="LINUX_LANGUAGE">Language</entry>
<entry lang="en" key="LINUX_SELECT_SYS_DEFAULT_LANG">Select system's default language</entry>
<entry lang="en" key="LINUX_RESTART_FOR_LANGUAGE_CHANGE">For the language change to come into effect, VeraCrypt needs to be restarted.</entry>
<entry lang="en" key="ERR_XTS_MASTERKEY_VULNERABLE">WARNING: The volume's master key is vulnerable to an attack that compromises data security.\n\nPlease create a new volume and transfer the data to it.</entry>
<entry lang="en" key="ERR_SYSENC_XTS_MASTERKEY_VULNERABLE">WARNING: The encrypted system's master key is vulnerable to an attack that compromises data security.\nPlease decrypt the system partition/drive and then re-encrypt it.</entry>
<entry lang="en" key="ERR_XTS_MASTERKEY_VULNERABLE_SHORT">WARNING: The volume's master key has a security vulnerability.</entry>
</localization>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VeraCrypt">
Expand Down
4 changes: 4 additions & 0 deletions src/Common/Password.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
if (nStatus == ERR_CIPHER_INIT_WEAK_KEY)
nStatus = 0; // We can ignore this error here

// if the XTS master key is vulnerable, return error and do not allow the user to change the password since the master key will not be changed
if (cryptoInfo->bVulnerableMasterKey)
nStatus = ERR_XTS_MASTERKEY_VULNERABLE;

if (nStatus == ERR_PASSWORD_WRONG)
{
continue; // Try next volume type
Expand Down
4 changes: 3 additions & 1 deletion src/Common/Tcdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ enum
ERR_NONSYS_INPLACE_ENC_INCOMPLETE = 32,
ERR_USER_ABORT = 33,
ERR_RAND_INIT_FAILED = 34,
ERR_CAPI_INIT_FAILED = 35
ERR_CAPI_INIT_FAILED = 35,
ERR_XTS_MASTERKEY_VULNERABLE = 36,
ERR_SYSENC_XTS_MASTERKEY_VULNERABLE = 37
};

#endif // #ifndef TCDEFS_H
8 changes: 8 additions & 0 deletions src/Common/Volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,14 @@ KeyReady: ;
goto err;
}

// check that first half of keyInfo.master_keydata is different from the second half. If they are the same return error
if (memcmp (keyInfo->master_keydata, keyInfo->master_keydata + EAGetKeySize (cryptoInfo->ea), EAGetKeySize (cryptoInfo->ea)) == 0)
{
cryptoInfo->bVulnerableMasterKey = TRUE;
if (retHeaderCryptoInfo)
retHeaderCryptoInfo->bVulnerableMasterKey = TRUE;
}

status = ERR_SUCCESS;
goto ret;
}
Expand Down
8 changes: 6 additions & 2 deletions src/Core/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ namespace VeraCrypt
shared_ptr <Pkcs5Kdf> m_newPkcs5Kdf;
int m_wipeCount;
bool m_emvSupportEnabled;
ChangePasswordThreadRoutine(shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount, bool emvSupportEnabled) : m_volumePath(volumePath), m_preserveTimestamps(preserveTimestamps), m_password(password), m_pim(pim), m_kdf(kdf), m_keyfiles(keyfiles), m_newPassword(newPassword), m_newPim(newPim), m_newKeyfiles(newKeyfiles), m_newPkcs5Kdf(newPkcs5Kdf), m_wipeCount(wipeCount), m_emvSupportEnabled(emvSupportEnabled) {}
bool m_masterKeyVulnerable;
ChangePasswordThreadRoutine(shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount, bool emvSupportEnabled) : m_volumePath(volumePath), m_preserveTimestamps(preserveTimestamps), m_password(password), m_pim(pim), m_kdf(kdf), m_keyfiles(keyfiles), m_newPassword(newPassword), m_newPim(newPim), m_newKeyfiles(newKeyfiles), m_newPkcs5Kdf(newPkcs5Kdf), m_wipeCount(wipeCount), m_emvSupportEnabled(emvSupportEnabled), m_masterKeyVulnerable(false) {}
virtual ~ChangePasswordThreadRoutine() { }
virtual void ExecutionCode(void) { Core->ChangePassword(m_volumePath, m_preserveTimestamps, m_password, m_pim, m_kdf, m_keyfiles, m_newPassword, m_newPim, m_newKeyfiles, m_emvSupportEnabled, m_newPkcs5Kdf, m_wipeCount); }
virtual void ExecutionCode(void) {
shared_ptr <Volume> openVolume = Core->ChangePassword(m_volumePath, m_preserveTimestamps, m_password, m_pim, m_kdf, m_keyfiles, m_newPassword, m_newPim, m_newKeyfiles, m_emvSupportEnabled, m_newPkcs5Kdf, m_wipeCount);
m_masterKeyVulnerable = openVolume->IsMasterKeyVulnerable();
}
};

class OpenVolumeThreadRoutine : public WaitThreadRoutine
Expand Down
3 changes: 2 additions & 1 deletion src/Core/CoreBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ namespace VeraCrypt
}
}

void CoreBase::ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount) const
shared_ptr <Volume> CoreBase::ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf, int wipeCount) const
{
shared_ptr <Volume> volume = OpenVolume (volumePath, preserveTimestamps, password, pim, kdf, keyfiles, emvSupportEnabled);
ChangePassword (volume, newPassword, newPim, newKeyfiles, emvSupportEnabled, newPkcs5Kdf, wipeCount);
return volume;
}

void CoreBase::CoalesceSlotNumberAndMountPoint (MountOptions &options) const
Expand Down
2 changes: 1 addition & 1 deletion src/Core/CoreBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace VeraCrypt
virtual ~CoreBase ();

virtual void ChangePassword (shared_ptr <Volume> openVolume, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const;
virtual void ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const;
virtual shared_ptr <Volume> ChangePassword (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr <Pkcs5Kdf> kdf, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, bool emvSupportEnabled, shared_ptr <Pkcs5Kdf> newPkcs5Kdf = shared_ptr <Pkcs5Kdf> (), int wipeCount = PRAND_HEADER_WIPE_PASSES) const;
virtual void CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair = false) const = 0;
virtual void CoalesceSlotNumberAndMountPoint (MountOptions &options) const;
virtual void CreateKeyfile (const FilePath &keyfilePath) const;
Expand Down
9 changes: 8 additions & 1 deletion src/Driver/DriveFilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,16 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password,

if (ReadVolumeHeader (!hiddenVolume, header, password, pkcs5_prf, pim, &Extension->Queue.CryptoInfo, Extension->HeaderCryptoInfo) == 0)
{
// Header decrypted
// Header decrypted
status = STATUS_SUCCESS;
Dump ("Header decrypted\n");

if (Extension->HeaderCryptoInfo->bVulnerableMasterKey)
{
// The volume header master key is vulnerable
Dump ("The volume header master key is vulnerable\n");
}

// calculate Fingerprint
ComputeBootLoaderFingerprint (Extension->LowerDeviceObject, header);

Expand Down Expand Up @@ -2017,6 +2023,7 @@ void GetBootEncryptionStatus (PIRP irp, PIO_STACK_LOCATION irpSp)
bootEncStatus->ConfiguredEncryptedAreaStart = Extension->ConfiguredEncryptedAreaStart;
bootEncStatus->ConfiguredEncryptedAreaEnd = Extension->ConfiguredEncryptedAreaEnd;
bootEncStatus->EncryptedAreaStart = Extension->Queue.EncryptedAreaStart;
bootEncStatus->MasterKeyVulnerable = Extension->HeaderCryptoInfo->bVulnerableMasterKey;

if (SetupInProgress)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/Ntvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,

mount->VolumeMountedReadOnlyAfterDeviceWriteProtected = FALSE;
mount->VolumeMountedReadOnlyAfterPartialSysEnc = FALSE;
mount->VolumeMasterKeyVulnerable = FALSE;

// If we are opening a device, query its size first
if (bRawDevice)
Expand Down Expand Up @@ -648,6 +649,9 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
Dump ("Volume header decrypted\n");
Dump ("Required program version = %x\n", (int) Extension->cryptoInfo->RequiredProgramVersion);
Dump ("Legacy volume = %d\n", (int) Extension->cryptoInfo->LegacyVolume);
Dump ("Master key vulnerable = %d\n", (int) Extension->cryptoInfo->bVulnerableMasterKey);

mount->VolumeMasterKeyVulnerable = Extension->cryptoInfo->bVulnerableMasterKey;

if (IsHiddenSystemRunning() && !Extension->cryptoInfo->hiddenVolume)
{
Expand Down
6 changes: 6 additions & 0 deletions src/ExpandVolume/ExpandVolume.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
if (nStatus == ERR_CIPHER_INIT_WEAK_KEY)
nStatus = 0; // We can ignore this error here

// if the volume master key is vulnerable, print a warning to inform the user
if (cryptoInfo->bVulnerableMasterKey)
{
DebugAddProgressDlgStatus(hwndDlg, GetString ("ERR_XTS_MASTERKEY_VULNERABLE_SHORT"));
}

if (nStatus != 0)
{
cryptoInfo = NULL;
Expand Down
5 changes: 5 additions & 0 deletions src/Main/Forms/ChangePasswordDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -214,6 +216,9 @@ namespace VeraCrypt
throw ParameterIncorrect (SRC_POS);
}

if (masterKeyVulnerable)
Gui->ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");

EndModal (wxID_OK);
}
catch (UnportablePassword &e)
Expand Down
22 changes: 22 additions & 0 deletions src/Main/GraphicUserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ namespace VeraCrypt
hiddenVolumeMountOptions.Path = volumePath;

VolumeType::Enum volumeType = VolumeType::Normal;
bool masterKeyVulnerable = false;

// Open both types of volumes
while (true)
Expand Down Expand Up @@ -273,6 +274,13 @@ namespace VeraCrypt
}
}

// check if volume master key is vulnerable
if (volume->IsMasterKeyVulnerable())
{
masterKeyVulnerable = true;
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}

if (volumeType == VolumeType::Hidden)
hiddenVolume = volume;
else
Expand Down Expand Up @@ -366,6 +374,10 @@ namespace VeraCrypt
}

ShowWarning ("VOL_HEADER_BACKED_UP");

// display again warning that master key is vulnerable
if (masterKeyVulnerable)
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}

void GraphicUserInterface::BeginInteractiveBusyState (wxWindow *window)
Expand Down Expand Up @@ -1440,6 +1452,7 @@ namespace VeraCrypt
/* force the display of the random enriching interface */
RandomNumberGenerator::SetEnrichedByUserStatus (false);

bool masterKeyVulnerable = false;
if (restoreInternalBackup)
{
// Restore header from the internal backup
Expand Down Expand Up @@ -1492,6 +1505,8 @@ namespace VeraCrypt
return;
}

masterKeyVulnerable = volume->IsMasterKeyVulnerable();

RandomNumberGenerator::Start();
UserEnrichRandomPool (nullptr);

Expand Down Expand Up @@ -1590,6 +1605,7 @@ namespace VeraCrypt

if (decryptRoutine.m_bResult)
{
masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable();
decryptedLayout = layout;
break;
}
Expand Down Expand Up @@ -1645,6 +1661,12 @@ namespace VeraCrypt
}

ShowInfo ("VOL_HEADER_RESTORED");

// display warning if the volume master key is vulnerable
if (masterKeyVulnerable)
{
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}
}

DevicePath GraphicUserInterface::SelectDevice (wxWindow *parent) const
Expand Down
27 changes: 27 additions & 0 deletions src/Main/TextUserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ namespace VeraCrypt
hiddenVolumeMountOptions.EMVSupportEnabled = true;

VolumeType::Enum volumeType = VolumeType::Normal;
bool masterKeyVulnerable = false;

// Open both types of volumes
while (true)
Expand Down Expand Up @@ -387,6 +388,13 @@ namespace VeraCrypt
}
}

// check if volume master key is vulnerable
if (volume->IsMasterKeyVulnerable())
{
masterKeyVulnerable = true;
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}

if (volumeType == VolumeType::Hidden)
hiddenVolume = volume;
else
Expand Down Expand Up @@ -454,6 +462,10 @@ namespace VeraCrypt

ShowString (L"\n");
ShowInfo ("VOL_HEADER_BACKED_UP");

// display again warning that master key is vulnerable
if (masterKeyVulnerable)
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}

void TextUserInterface::ChangePassword (shared_ptr <VolumePath> volumePath, shared_ptr <VolumePassword> password, int pim, shared_ptr <Hash> currentHash, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Hash> newHash) const
Expand Down Expand Up @@ -532,6 +544,12 @@ namespace VeraCrypt
break;
}

// display warning if volume master key is vulnerable
if (volume->IsMasterKeyVulnerable())
{
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}

// New password
if (!newPassword.get() && !Preferences.NonInteractive)
newPassword = AskPassword (_("Enter new password"), true);
Expand Down Expand Up @@ -1539,6 +1557,7 @@ namespace VeraCrypt
/* force the display of the random enriching interface */
RandomNumberGenerator::SetEnrichedByUserStatus (false);

bool masterKeyVulnerable = false;
if (restoreInternalBackup)
{
// Restore header from the internal backup
Expand Down Expand Up @@ -1586,6 +1605,8 @@ namespace VeraCrypt
throw_err (LangString ["VOLUME_HAS_NO_BACKUP_HEADER"]);
}

masterKeyVulnerable = volume->IsMasterKeyVulnerable();

RandomNumberGenerator::Start();
UserEnrichRandomPool();

Expand Down Expand Up @@ -1673,6 +1694,7 @@ namespace VeraCrypt
if (layout->GetHeader()->Decrypt (headerBuffer, *passwordKey, options.Pim, kdf, layout->GetSupportedKeyDerivationFunctions(), layout->GetSupportedEncryptionAlgorithms(), layout->GetSupportedEncryptionModes()))
{
decryptedLayout = layout;
masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable();
break;
}
}
Expand Down Expand Up @@ -1723,6 +1745,11 @@ namespace VeraCrypt

ShowString (L"\n");
ShowInfo ("VOL_HEADER_RESTORED");
// display warning if the volume master key is vulnerable
if (masterKeyVulnerable)
{
ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}
}

void TextUserInterface::SetTerminalEcho (bool enable)
Expand Down
Loading

0 comments on commit ed1263b

Please sign in to comment.