Skip to content

Commit

Permalink
TPM: ReadPubEK output struct fix
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
srajiv authored and James Morris committed Jun 14, 2010
1 parent 7e27d6e commit 02a077c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/tpm/tpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 02a077c

Please sign in to comment.