mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-18 12:46:50 +00: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 <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
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);
|
err = crypto_rng_alg(tfm)->seed(tfm, seed, slen);
|
||||||
|
|
||||||
kfree(buf);
|
kzfree(buf);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(crypto_rng_reset);
|
EXPORT_SYMBOL_GPL(crypto_rng_reset);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue