Securely erase and protect buffer holding decrypted volume header.

This commit is contained in:
Mounir IDRASSI 2016-10-01 15:36:20 +02:00
parent 7d6347f468
commit 8e2c5ca45e
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC

View File

@ -249,6 +249,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
#if !defined(DEVICE_DRIVER)
VirtualLock (&keyInfo, sizeof (keyInfo));
VirtualLock (&dk, sizeof (dk));
VirtualLock (&header, sizeof (header));
#endif
#endif // !defined(_UEFI)
@ -571,10 +572,12 @@ KeyReady: ;
ret:
burn (&keyInfo, sizeof (keyInfo));
burn (dk, sizeof(dk));
burn (header, sizeof(header));
#if !defined(DEVICE_DRIVER) && !defined(_UEFI)
VirtualUnlock (&keyInfo, sizeof (keyInfo));
VirtualUnlock (&dk, sizeof (dk));
VirtualUnlock (&header, sizeof (header));
#endif
#if !defined(_UEFI)