]> git.karo-electronics.de Git - karo-tx-linux.git/commit
TPM: Call tpm_transmit with correct size
authorPeter Huewe <huewe.external.infineon@googlemail.com>
Thu, 15 Sep 2011 17:37:43 +0000 (14:37 -0300)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:18 +0000 (15:35 -0400)
commit5fde0bd53b45fb5ad654cd341617ccc1617f5ba3
treee0e5b12235c2b30cc48c2f6bd9101db5929faa1c
parenta025a0064309ef1a73260b29995981db7485ed2a
TPM: Call tpm_transmit with correct size

commit 6b07d30aca7e52f2881b8c8c20c8a2cd28e8b3d3 upstream.

This patch changes the call of tpm_transmit by supplying the size of the
userspace buffer instead of TPM_BUFSIZE.

This got assigned CVE-2011-1161.

[The first hunk didn't make sense given one could expect
 way less data than TPM_BUFSIZE, so added tpm_transmit boundary
 check over bufsiz instead
 The last parameter of tpm_transmit() reflects the amount
 of data expected from the device, and not the buffer size
 being supplied to it. It isn't ideal to parse it directly,
 so we just set it to the maximum the input buffer can handle
 and let the userspace API to do such job.]

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/char/tpm/tpm.c