cryoto: drbg - clear all temporary memory
The buffer uses for temporary data must be cleared entirely. In AES192 the used buffer is drbg_statelen(drbg) + drbg_blocklen(drbg) as documented in the comment above drbg_ctr_df. This patch ensures that the temp buffer is completely wiped. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
1a92b2ba33
commit
8e0498d99f
1 changed files with 1 additions and 1 deletions
|
@ -487,7 +487,7 @@ static int drbg_ctr_df(struct drbg_state *drbg,
|
|||
|
||||
out:
|
||||
memset(iv, 0, drbg_blocklen(drbg));
|
||||
memset(temp, 0, drbg_statelen(drbg));
|
||||
memset(temp, 0, drbg_statelen(drbg) + drbg_blocklen(drbg));
|
||||
memset(pad, 0, drbg_blocklen(drbg));
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue