diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-30 20:28:34 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-30 20:28:34 +0200 |
commit | 62f444e0548eb503b42c8447675b468f5cf40c69 (patch) | |
tree | cc2b169aa9f9d5f0bbe8a77b95ee5eba20c3033e | |
parent | Merge tag 'dlm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/te... (diff) | |
parent | PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument (diff) | |
download | linux-62f444e0548eb503b42c8447675b468f5cf40c69.tar.xz linux-62f444e0548eb503b42c8447675b468f5cf40c69.zip |
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; |