projects
/
platform
/
kernel
/
linux-rpi3.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
|
history
diff --git
a/crypto/rng.c
b/crypto/rng.c
index
055e276
..
1315505
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);