VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-20 23:42:53 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-20 23:45:31 (GMT)
commitee0a2659da24b4b7543f52647fb2d8cbbd12408c (patch)
tree2977c82ee2d24d4c0bfd18a30b3f0fe7b4b25601 /src/Driver
parent27b3fee02d5242e743f87dd15db61d89073e8caa (diff)
downloadVeraCrypt-ee0a2659da24b4b7543f52647fb2d8cbbd12408c.zip
VeraCrypt-ee0a2659da24b4b7543f52647fb2d8cbbd12408c.tar.gz
Windows driver: remove volumes master keys from CRYPTO_INFO since they are not needed after their key schedule is created
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/DriveFilter.c4
-rw-r--r--src/Driver/Ntvol.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index c1f3832..7105838 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -2181,10 +2181,8 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg)
DecoySystemWipeResult = STATUS_INVALID_PARAMETER;
goto ret;
}
-
- memcpy (wipeCryptoInfo->k2, WipeDecoyRequest.WipeKey + EAGetKeySize (ea), EAGetKeySize (ea));
- if (!EAInitMode (wipeCryptoInfo))
+ if (!EAInitMode (wipeCryptoInfo, WipeDecoyRequest.WipeKey + EAGetKeySize (ea)))
{
DecoySystemWipeResult = STATUS_INVALID_PARAMETER;
goto err;
diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c
index 852aafd..a317d8b 100644
--- a/src/Driver/Ntvol.c
+++ b/src/Driver/Ntvol.c
@@ -663,7 +663,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
if (Extension->cryptoInfo->hiddenVolume && IsHiddenSystemRunning())
{
// Prevent mount of a hidden system partition if the system hosted on it is currently running
- if (memcmp (Extension->cryptoInfo->master_keydata, GetSystemDriveCryptoInfo()->master_keydata, EAGetKeySize (Extension->cryptoInfo->ea)) == 0)
+ if (memcmp (Extension->cryptoInfo->master_keydata_hash, GetSystemDriveCryptoInfo()->master_keydata_hash, sizeof(Extension->cryptoInfo->master_keydata_hash)) == 0)
{
mount->nReturnCode = ERR_VOL_ALREADY_MOUNTED;
ntStatus = STATUS_SUCCESS;