You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The KeyLibGenerateSalt function fails to check the return value of RandomSeed and RandomBytes function
calls.
SavePasswordToVariable function also fails to check the status of calling function KeyLibGenerateSalt
Snippet below
EFI_STATUS
SavePasswordToVariable (
IN EFI_GUID *UserGuid,
IN CHAR8 *Password, OPTIONAL
IN UINTN PasswordSize
)
{
EFI_STATUS Status;
USER_PASSWORD_VAR_STRUCT UserPasswordVarStruct;
BOOLEAN HashOk;
//
// If password is NULL, it means we want to clean password field saved in variable region.
//
if (Password != NULL) {
KeyLibGenerateSalt (UserPasswordVarStruct.PasswordSalt, sizeof(UserPasswordVarStruct.PasswordSalt));
BOOLEAN
EFIAPI
KeyLibGenerateSalt (
IN OUT UINT8 *SaltValue,
IN UINTN SaltSize
)
{
if (SaltValue == NULL) {
return FALSE;
}
RandomSeed(NULL, 0);
RandomBytes(SaltValue, SaltSize);
return TRUE;
}
This issue was created automatically with bugzilla2github
Bugzilla Bug 4649
Date: 2024-01-17T01:59:36+00:00
From: tabassum.yasmin
To: unassigned <>
CC: @lgao4
Last updated: 2024-01-30T21:46:07+00:00
The text was updated successfully, but these errors were encountered: