diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-21 05:46:49 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-22 04:30:21 +0300 |
commit | b617b702da4e922277806f81c411d3051107d462 (patch) | |
tree | 580d9202c8b14f0798c16e14be7beeb5cd08f440 | |
parent | 654ae152b3d1f3d5d473d845a403e4b5c1a39389 (diff) | |
download | linux-b617b702da4e922277806f81c411d3051107d462.tar.xz |
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>
-rw-r--r-- | crypto/rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rng.c b/crypto/rng.c index 055e276427b1..13155058b193 100644 --- a/crypto/rng.c +++ b/crypto/rng.c @@ -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); |