1. 22 Sep, 2011 3 commits
    • Peter Huewe's avatar
      TPM: Call tpm_transmit with correct size · 6b07d30a
      Peter Huewe authored
      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: default avatarRajiv Andrade <srajiv@linux.vnet.ibm.com>
      Cc: Stable Kernel <stable@kernel.org>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      6b07d30a
    • Axel Lin's avatar
      TPM: tpm_nsc: Fix a double free of pdev in cleanup_nsc · de69113e
      Axel Lin authored
      platform_device_unregister() will release all resources
      and remove it from the subsystem, then drop reference count by
      calling platform_device_put().
      
      We should not call kfree(pdev) after platform_device_unregister(pdev).
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Signed-off-by: default avatarRajiv Andrade <srajiv@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      de69113e
    • Geert Uytterhoeven's avatar
      TPM: TCG_ATMEL should depend on HAS_IOPORT · 5ce5ed35
      Geert Uytterhoeven authored
      On m68k, I get:
      
      drivers/char/tpm/tpm_atmel.h: In function ‘atmel_get_base_addr’:
      drivers/char/tpm/tpm_atmel.h:129: error: implicit declaration of function ‘ioport_map’
      drivers/char/tpm/tpm_atmel.h:129: warning: return makes pointer from integer without a cast
      
      The code in tpm_atmel.h supports PPC64 (using the device tree and ioremap())
      and "anything else" (using ioport_map()). However, ioportmap() is only
      available on platforms that set HAS_IOPORT.
      
      Although PC64 seems to have HAS_IOPORT, a "depends on HAS_IOPORT" should work,
      but I think it's better to expose the special PPC64 handling explicit using
      "depends on PPC64 || HAS_IOPORT".
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarRajiv Andrade <srajiv@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      5ce5ed35
  2. 21 Sep, 2011 14 commits
  3. 20 Sep, 2011 23 commits