]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.32.17/tpm-readpubek-output-struct-fix.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.17 / tpm-readpubek-output-struct-fix.patch
1 From 02a077c52ef7631275a79862ffd9f3dbe9d38bc2 Mon Sep 17 00:00:00 2001
2 From: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
3 Date: Mon, 14 Jun 2010 13:58:22 -0300
4 Subject: TPM: ReadPubEK output struct fix
5
6 From: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
7
8 commit 02a077c52ef7631275a79862ffd9f3dbe9d38bc2 upstream.
9
10 This patch adds a missing element of the ReadPubEK command output,
11 that prevents future overflow of this buffer when copying the
12 TPM output result into it.
13
14 Prevents a kernel panic in case the user tries to read the
15 pubek from sysfs.
16
17 Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
18 Signed-off-by: James Morris <jmorris@namei.org>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20
21 ---
22 drivers/char/tpm/tpm.h | 1 +
23 1 file changed, 1 insertion(+)
24
25 --- a/drivers/char/tpm/tpm.h
26 +++ b/drivers/char/tpm/tpm.h
27 @@ -224,6 +224,7 @@ struct tpm_readpubek_params_out {
28 u8 algorithm[4];
29 u8 encscheme[2];
30 u8 sigscheme[2];
31 + __be32 paramsize;
32 u8 parameters[12]; /*assuming RSA*/
33 __be32 keysize;
34 u8 modulus[256];