VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/VolumeInfo.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-02 00:20:53 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-02 00:20:53 +0200
commited1263bf8c6c678420eb1b9ad3f37d3a6d33af7c (patch)
tree14dfb134969574b7f0d869c455981418c652780e /src/Volume/VolumeInfo.cpp
parent6121ca02397e75fe51b2c76111ef836556fedb49 (diff)
downloadVeraCrypt-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/Volume/VolumeInfo.cpp')
-rw-r--r--src/Volume/VolumeInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Volume/VolumeInfo.cpp b/src/Volume/VolumeInfo.cpp
index 699e203f..f3b044b7 100644
--- a/src/Volume/VolumeInfo.cpp
+++ b/src/Volume/VolumeInfo.cpp
@@ -55,6 +55,7 @@ namespace VeraCrypt
VirtualDevice = sr.DeserializeWString ("VirtualDevice");
sr.Deserialize ("VolumeCreationTime", VolumeCreationTime);
sr.Deserialize ("Pim", Pim);
+ sr.Deserialize ("MasterKeyVulnerable", MasterKeyVulnerable);
}
bool VolumeInfo::FirstVolumeMountedAfterSecond (shared_ptr <VolumeInfo> first, shared_ptr <VolumeInfo> second)
@@ -95,6 +96,7 @@ namespace VeraCrypt
sr.Serialize ("VirtualDevice", wstring (VirtualDevice));
sr.Serialize ("VolumeCreationTime", VolumeCreationTime);
sr.Serialize ("Pim", Pim);
+ sr.Serialize ("MasterKeyVulnerable", MasterKeyVulnerable);
}
void VolumeInfo::Set (const Volume &volume)
@@ -119,6 +121,7 @@ namespace VeraCrypt
TotalDataRead = volume.GetTotalDataRead();
TotalDataWritten = volume.GetTotalDataWritten();
Pim = volume.GetPim ();
+ MasterKeyVulnerable = volume.IsMasterKeyVulnerable();
}
TC_SERIALIZER_FACTORY_ADD_CLASS (VolumeInfo);