tpm: fix a race condition in tpm2_unseal_trusted()
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 16 Aug 2016 19:00:38 +0000 (22:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 16:03:41 +0000 (18:03 +0200)
commit17b6c49b083c73bcb84205afd3e6d6b6a7b19459
tree9c8b2141c45210713152205f27519042c6525457
parenta8284cfff8f1115ec048c8127bbc34c224e33076
tpm: fix a race condition in tpm2_unseal_trusted()

commit d4816edfe706497a8525480c1685ceb9871bc118 upstream.

Unseal and load operations should be done as an atomic operation. This
commit introduces unlocked tpm_transmit() so that tpm2_unseal_trusted()
can do the locking by itself.

Fixes: 0fe5480303a1 ("keys, trusted: seal/unseal with TPM 2.0 chips")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm-dev.c
drivers/char/tpm/tpm-interface.c
drivers/char/tpm/tpm-sysfs.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-cmd.c
This page took 0.030354 seconds and 5 git commands to generate.