diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-30 13:28:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-30 13:28:34 -0500 |
commit | 62f444e0548eb503b42c8447675b468f5cf40c69 (patch) | |
tree | cc2b169aa9f9d5f0bbe8a77b95ee5eba20c3033e | |
parent | 07c0db771dffe5856c8456e40e2d3066a351e270 (diff) | |
parent | e54358915d0a00399c11c2c23ae1be674cba188a (diff) | |
download | linux-62f444e0548eb503b42c8447675b468f5cf40c69.tar.bz2 |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
"This fixes a bug in pkcs7_validate_trust and its users where the
output value may in fact be taken from uninitialised memory"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument
-rw-r--r-- | crypto/asymmetric_keys/pkcs7_trust.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/pkcs7_trust.c b/crypto/asymmetric_keys/pkcs7_trust.c index 3bbdcc79a3d3..7d7a39b47c62 100644 --- a/crypto/asymmetric_keys/pkcs7_trust.c +++ b/crypto/asymmetric_keys/pkcs7_trust.c @@ -178,6 +178,8 @@ int pkcs7_validate_trust(struct pkcs7_message *pkcs7, int cached_ret = -ENOKEY; int ret; + *_trusted = false; + for (p = pkcs7->certs; p; p = p->next) p->seen = false; |