Atmel TPM: Fix potential buffer overruns
authorJeremy Boone <jeremy.boone@nccgroup.trust>
Mon, 12 Feb 2018 22:56:37 +0000 (17:56 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 5 Mar 2018 15:05:36 +0000 (10:05 -0500)
commitb3f40703408e57cad492802b777448a068b1f671
treef70dbe24a583f0f794a5eefffeae66716d382c13
parentafe0e6bddf295d4514ab56cd76d5ec13a9c30b22
Atmel TPM: Fix potential buffer overruns

Ensure that the Atmel TPM driver performs sufficient
validation of the length returned in the TPM response header.
This patch prevents memory corruption if the header contains a
length value that is larger than the destination buffer.

Signed-off-by: Jeremy Boone <jeremy.boone@nccgroup.trust>
drivers/tpm/tpm_atmel_twi.c