mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
crypto: rng - Zero seed in crypto_rng_reset
If we allocate a seed on behalf ot the user in crypto_rng_reset, we must ensure that it is zeroed afterwards or the RNG may be compromised. Reported-by: Stephan Mueller <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
654ae152b3
commit
b617b702da
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)
|
|||
|
||||
err = crypto_rng_alg(tfm)->seed(tfm, seed, slen);
|
||||
|
||||
kfree(buf);
|
||||
kzfree(buf);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_rng_reset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue