char/tpm: Fix unitialized usage of data buffer

This patch fixes information leakage to the userspace by initializing
the data buffer to zero.

Reported-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com>
[ Also removed the silly "* sizeof(u8)". If that isn't 1, we have way
deeper problems than a simple multiplication can fix. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Peter Huewe and committed by Linus Torvalds 1309d7af 0444d76a

+1 -1
+1 -1
drivers/char/tpm/tpm.c
··· 980 980 return -EBUSY; 981 981 } 982 982 983 - chip->data_buffer = kmalloc(TPM_BUFSIZE * sizeof(u8), GFP_KERNEL); 983 + chip->data_buffer = kzalloc(TPM_BUFSIZE, GFP_KERNEL); 984 984 if (chip->data_buffer == NULL) { 985 985 clear_bit(0, &chip->is_open); 986 986 put_device(chip->dev);