summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-30 13:28:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-30 13:28:34 -0500
commit62f444e0548eb503b42c8447675b468f5cf40c69 (patch)
treecc2b169aa9f9d5f0bbe8a77b95ee5eba20c3033e /crypto
parent07c0db771dffe5856c8456e40e2d3066a351e270 (diff)
parente54358915d0a00399c11c2c23ae1be674cba188a (diff)
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
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asymmetric_keys/pkcs7_trust.c2
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;