]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
tpm: fix checks for policy digest existence in tpm2_seal_trusted()
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 6 Jan 2016 14:43:30 +0000 (16:43 +0200)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:29:19 +0000 (10:29 +0100)
commitdb50ebc65738c30cc5d623833660c66b2023e2b1
tree1499732411b0580477e1a536296692db79005f59
parentfa0582737c6dd0e3a4975f79df8c088d798cc871
tpm: fix checks for policy digest existence in tpm2_seal_trusted()

BugLink: http://bugs.launchpad.net/bugs/1398274
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>
(cherry picked from commit f3c82ade7c59303167d56b0be3e0707751fc45e2)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/char/tpm/tpm2-cmd.c
include/keys/trusted-type.h
security/keys/trusted.c