瀏覽代碼

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 <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Rajiv Andrade 15 年之前
父節點
當前提交
02a077c52e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/char/tpm/tpm.h

+ 1 - 0
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];