Commit b617b702 authored by Herbert Xu's avatar Herbert Xu

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: 's avatarStephan Mueller <smueller@chronox.de>
Signed-off-by: 's avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 654ae152
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment