mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user