mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows Driver Sanity check: check that the password length passed from the bootloader is less than or equal to 64 before using it.
This commit is contained in:
@@ -97,28 +97,32 @@ NTSTATUS LoadBootArguments ()
|
|||||||
TC_BUG_CHECK (STATUS_CRC_ERROR);
|
TC_BUG_CHECK (STATUS_CRC_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
BootLoaderSegment = bootLoaderSegment;
|
// Sanity check: for valid boot argument, the password is less than 64 bytes long
|
||||||
|
if (bootArguments->BootPassword.Length <= MAX_PASSWORD)
|
||||||
|
{
|
||||||
|
BootLoaderSegment = bootLoaderSegment;
|
||||||
|
|
||||||
BootArgs = *bootArguments;
|
BootArgs = *bootArguments;
|
||||||
BootArgsValid = TRUE;
|
BootArgsValid = TRUE;
|
||||||
burn (bootArguments, sizeof (*bootArguments));
|
burn (bootArguments, sizeof (*bootArguments));
|
||||||
|
|
||||||
BootDriveSignatureValid = TRUE;
|
BootDriveSignatureValid = TRUE;
|
||||||
|
|
||||||
Dump ("BootLoaderVersion = %x\n", (int) BootArgs.BootLoaderVersion);
|
Dump ("BootLoaderVersion = %x\n", (int) BootArgs.BootLoaderVersion);
|
||||||
Dump ("HeaderSaltCrc32 = %x\n", (int) BootArgs.HeaderSaltCrc32);
|
Dump ("HeaderSaltCrc32 = %x\n", (int) BootArgs.HeaderSaltCrc32);
|
||||||
Dump ("CryptoInfoOffset = %x\n", (int) BootArgs.CryptoInfoOffset);
|
Dump ("CryptoInfoOffset = %x\n", (int) BootArgs.CryptoInfoOffset);
|
||||||
Dump ("CryptoInfoLength = %d\n", (int) BootArgs.CryptoInfoLength);
|
Dump ("CryptoInfoLength = %d\n", (int) BootArgs.CryptoInfoLength);
|
||||||
Dump ("HiddenSystemPartitionStart = %I64u\n", BootArgs.HiddenSystemPartitionStart);
|
Dump ("HiddenSystemPartitionStart = %I64u\n", BootArgs.HiddenSystemPartitionStart);
|
||||||
Dump ("DecoySystemPartitionStart = %I64u\n", BootArgs.DecoySystemPartitionStart);
|
Dump ("DecoySystemPartitionStart = %I64u\n", BootArgs.DecoySystemPartitionStart);
|
||||||
Dump ("Flags = %x\n", BootArgs.Flags);
|
Dump ("Flags = %x\n", BootArgs.Flags);
|
||||||
Dump ("BootDriveSignature = %x\n", BootArgs.BootDriveSignature);
|
Dump ("BootDriveSignature = %x\n", BootArgs.BootDriveSignature);
|
||||||
Dump ("BootArgumentsCrc32 = %x\n", BootArgs.BootArgumentsCrc32);
|
Dump ("BootArgumentsCrc32 = %x\n", BootArgs.BootArgumentsCrc32);
|
||||||
|
|
||||||
if (CacheBootPassword && BootArgs.BootPassword.Length > 0)
|
if (CacheBootPassword && BootArgs.BootPassword.Length > 0)
|
||||||
AddPasswordToCache (&BootArgs.BootPassword);
|
AddPasswordToCache (&BootArgs.BootPassword);
|
||||||
|
|
||||||
status = STATUS_SUCCESS;
|
status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MmUnmapIoSpace (mappedBootArgs, sizeof (BootArguments));
|
MmUnmapIoSpace (mappedBootArgs, sizeof (BootArguments));
|
||||||
|
|||||||
Reference in New Issue
Block a user