summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-01-06 16:43:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-04 14:49:15 -0700
commit5504693f5dcfae316d10706f6367f8724d69c67f (patch)
treed50fa6b63113bc05c09a70986ea1973567111b89 /include
parentd84be57178d73e9007704e34ac510974a1c380aa (diff)
tpm: fix checks for policy digest existence in tpm2_seal_trusted()
commit f3c82ade7c59303167d56b0be3e0707751fc45e2 upstream. In my original patch sealing with policy was done with dynamically allocated buffer that I changed later into an array so the checks in tpm2-cmd.c became invalid. This patch fixes the issue. Fixes: 5beb0c435bdd ("keys, trusted: seal with a TPM2 authorization policy") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/keys/trusted-type.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h
index 42cf2d991bf4..4ea7e55f20b0 100644
--- a/include/keys/trusted-type.h
+++ b/include/keys/trusted-type.h
@@ -38,7 +38,7 @@ struct trusted_key_options {
unsigned char pcrinfo[MAX_PCRINFO_SIZE];
int pcrlock;
uint32_t hash;
- uint32_t digest_len;
+ uint32_t policydigest_len;
unsigned char policydigest[MAX_DIGEST_SIZE];
uint32_t policyhandle;
};