]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
TPM: ReadPubEK output struct fix
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>
Mon, 14 Jun 2010 16:58:22 +0000 (13:58 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:20:46 +0000 (10:20 -0700)
commit 02a077c52ef7631275a79862ffd9f3dbe9d38bc2 upstream.

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 <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tpm/tpm.h

index 8e00b4ddd0830699bca8bab65c3e855657b21978..792868d24f2a0f2ad6bc21a4967ace01a2f84d92 100644 (file)
@@ -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];