mirror of https://github.com/wolfSSL/wolfssh.git
Missing ForceZero on plaintext password copy
When a copy of the user's password is freed, it wasn't getting force zeroed. It might still exist in the heap after getting freed. Added a call to `ForceZero()`. Affected function: CheckPasswordUnix. Issue: F-56pull/883/head
parent
86636797ee
commit
3cfec8b3d2
|
|
@ -430,6 +430,7 @@ static int CheckPasswordUnix(const char* usr, const byte* pw, word32 pwSz, WOLFS
|
|||
}
|
||||
|
||||
if (pwStr != NULL) {
|
||||
ForceZero(pwStr, pwSz + 1);
|
||||
WFREE(pwStr, NULL, DYNTYPE_STRING);
|
||||
}
|
||||
if (storedHashCpy != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue