diff options
author | Stefan Mahnke-Hartmann <stefan.mahnke-hartmann@infineon.com> | 2022-05-13 15:41:51 +0200 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2022-05-23 17:47:49 +0200 |
commit | e57b2523bd37e6434f4e64c7a685e3715ad21e9a (patch) | |
tree | bdf69a62db205486f29407390b3ccf984655bf35 /COPYING | |
parent | char: tpm: cr50_i2c: Suppress duplicated error message in .remove() (diff) | |
download | linux-e57b2523bd37e6434f4e64c7a685e3715ad21e9a.tar.xz linux-e57b2523bd37e6434f4e64c7a685e3715ad21e9a.zip |
tpm: Fix buffer access in tpm2_get_tpm_pt()
Under certain conditions uninitialized memory will be accessed.
As described by TCG Trusted Platform Module Library Specification,
rev. 1.59 (Part 3: Commands), if a TPM2_GetCapability is received,
requesting a capability, the TPM in field upgrade mode may return a
zero length list.
Check the property count in tpm2_get_tpm_pt().
Fixes: 2ab3241161b3 ("tpm: migrate tpm2_get_tpm_pt() to use struct tpm_buf")
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Mahnke-Hartmann <stefan.mahnke-hartmann@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions