]> git.karo-electronics.de Git - linux-beck.git/commit
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)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Thu, 15 Sep 2016 13:04:21 +0000 (16:04 +0300)
commitd4816edfe706497a8525480c1685ceb9871bc118
tree73c4afa873f131ab70998332b9f4ece9e6f83d24
parentb7d7b28471072fc23e7b573aef89c14438092223
tpm: fix a race condition in tpm2_unseal_trusted()

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")
Cc: stable@vger.kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
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