projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
654ae15
)
crypto: rng - Zero seed in crypto_rng_reset
author
Herbert Xu
<herbert@gondor.apana.org.au>
Tue, 21 Apr 2015 02:46:49 +0000
(10:46 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 22 Apr 2015 01:30:21 +0000
(09:30 +0800)
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>
crypto/rng.c
patch
|
blob
|
blame
|
history
diff --git
a/crypto/rng.c
b/crypto/rng.c
index 055e276427b120ed48c2acb6314c2e9d922c36ea..13155058b19317282c36b2a56261d74d28f8ab6a 100644
(file)
--- 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);
+ k
z
free(buf);
return err;
}
EXPORT_SYMBOL_GPL(crypto_rng_reset);