From: Rajiv Andrade Date: Mon, 14 Jun 2010 16:58:22 +0000 (-0300) Subject: TPM: ReadPubEK output struct fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02a077c52ef7631275a79862ffd9f3dbe9d38bc2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git TPM: ReadPubEK output struct fix This patch adds a missing element of the ReadPubEK command output, that prevents future overflow of this buffer when copying the TPM output result into it. Prevents a kernel panic in case the user tries to read the pubek from sysfs. Signed-off-by: Rajiv Andrade Signed-off-by: James Morris --- diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 8e00b4ddd083..792868d24f2a 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -224,6 +224,7 @@ struct tpm_readpubek_params_out { u8 algorithm[4]; u8 encscheme[2]; u8 sigscheme[2]; + __be32 paramsize; u8 parameters[12]; /*assuming RSA*/ __be32 keysize; u8 modulus[256];