linux/drivers/char/tpm
Jesper Juhl f334ac8da8 tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails.
In drivers/char/tpm/tpm_acpi.c::read_log() we call
acpi_os_map_memory(). That call may fail for a number of reasons
(invalid address, out of memory etc). If the call fails it returns
NULL and we just pass that to memcpy() unconditionally, which will go
bad when it tries to dereference the pointer.

Unfortunately we just get NULL back, so we can't really tell the user
exactely what went wrong, but we can at least avoid crashing and
return an error (-EIO seemed more generic and more suitable here than
-ENOMEM or something else, so I picked that).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
2012-08-22 16:23:34 -05:00
..
Kconfig drivers/char/tpm: Add new device driver to support IBM vTPM 2012-08-22 16:21:45 -05:00
Makefile drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm.c tpm: fix double write race and tpm_release free issue 2012-08-22 11:11:49 -05:00
tpm.h drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_acpi.c tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails. 2012-08-22 16:23:34 -05:00
tpm_atmel.c tpm_atmel: Use struct dev_pm_ops for power management 2012-07-10 21:37:02 +02:00
tpm_atmel.h
tpm_eventlog.c tpm: modularize event log collection 2012-08-22 11:11:25 -05:00
tpm_eventlog.h drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_i2c_infineon.c char/tpm: Add new driver for Infineon I2C TIS TPM 2012-08-22 11:11:13 -05:00
tpm_ibmvtpm.c drivers/char/tpm: Add new device driver to support IBM vTPM 2012-08-22 16:21:45 -05:00
tpm_ibmvtpm.h drivers/char/tpm: Add new device driver to support IBM vTPM 2012-08-22 16:21:45 -05:00
tpm_infineon.c MAINTAINERS: TPM maintainers' contacts update 2012-06-12 18:53:22 -03:00
tpm_nsc.c tpm_nsc: Use struct dev_pm_ops for power management 2012-07-10 21:37:18 +02:00
tpm_of.c drivers/char/tpm: Add securityfs support for event log 2012-08-22 16:22:47 -05:00
tpm_tis.c tpm: compile out unused code in the PNP and PM cases 2012-08-22 11:12:03 -05:00