diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2017-01-25 21:00:22 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-14 12:00:13 (GMT) |
commit | 326f9b0a39d3a27221dafc46e9862c7a1aa8fb19 (patch) | |
tree | 9a68eb639991a2f7262d97aa6bbfe5bcac734b3e /drivers/char/nwflash.c | |
parent | a941f261c8f16faa22d3fcd16842f6d8c2723eac (diff) | |
download | linux-326f9b0a39d3a27221dafc46e9862c7a1aa8fb19.tar.xz |
tpm: fix RC value check in tpm2_seal_trusted
commit 7d761119a914ec0ac05ec2a5378d1f86e680967d upstream.
The error code handling is broken as any error code that has the same
bits set as TPM_RC_HASH passes. Implemented tpm2_rc_value() helper to
parse the error value from FMT0 and FMT1 error codes so that these types
of mistakes are prevented in the future.
Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 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>
Diffstat (limited to 'drivers/char/nwflash.c')
0 files changed, 0 insertions, 0 deletions