Windows Driver: fix BSOD when mounting hidden volume if RAM encryption is enabled

This commit is contained in:
Mounir IDRASSI 2019-03-08 00:32:03 +01:00
parent 9a76ecfc55
commit f780011a86
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

View File

@ -591,10 +591,6 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
mount->VolumePim,
mount->bTrueCryptMode,
&Extension->cryptoInfo);
#ifdef _WIN64
if (IsRamEncryptionEnabled())
VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo));
#endif
}
ReadVolumeHeaderRecoveryMode = FALSE;
@ -611,6 +607,11 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
goto error;
}
#ifdef _WIN64
if (IsRamEncryptionEnabled())
VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo));
#endif
Dump ("Volume header decrypted\n");
Dump ("Required program version = %x\n", (int) Extension->cryptoInfo->RequiredProgramVersion);
Dump ("Legacy volume = %d\n", (int) Extension->cryptoInfo->LegacyVolume);