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:
Mounir IDRASSI 2014-10-26 00:58:49 +02:00
parent 3f2e20e339
commit f7d8e565b4

View File

@ -97,6 +97,9 @@ NTSTATUS LoadBootArguments ()
TC_BUG_CHECK (STATUS_CRC_ERROR);
}
// Sanity check: for valid boot argument, the password is less than 64 bytes long
if (bootArguments->BootPassword.Length <= MAX_PASSWORD)
{
BootLoaderSegment = bootLoaderSegment;
BootArgs = *bootArguments;
@ -120,6 +123,7 @@ NTSTATUS LoadBootArguments ()
status = STATUS_SUCCESS;
}
}
MmUnmapIoSpace (mappedBootArgs, sizeof (BootArguments));
}