Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Mar 2016 18:28:34 +0000 (13:28 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Mar 2016 18:28:34 +0000 (13:28 -0500)
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

1  2 
crypto/asymmetric_keys/pkcs7_trust.c

index 3bbdcc79a3d345549a51e816754559f2a650ccd9,ecdb5a2ce085844dcdcc25a3032582b955cf410c..7d7a39b47c6236a85cc5e9b3f5c42528a3c0fbb0
@@@ -17,7 -17,7 +17,7 @@@
  #include <linux/asn1.h>
  #include <linux/key.h>
  #include <keys/asymmetric-type.h>
 -#include "public_key.h"
 +#include <crypto/public_key.h>
  #include "pkcs7_parser.h"
  
  /**
@@@ -178,6 -178,8 +178,8 @@@ int pkcs7_validate_trust(struct pkcs7_m
        int cached_ret = -ENOKEY;
        int ret;
  
+       *_trusted = false;
        for (p = pkcs7->certs; p; p = p->next)
                p->seen = false;