linux/drivers/char/tpm
Tadeusz Struk 18c3955323 tpm: Handle negative priv->response_len in tpm_common_read()
commit a430e67d9a upstream.

The priv->response_length can hold the size of an response or an negative
error code, and the tpm_common_read() needs to handle both cases correctly.
Changed the type of response_length to signed and accounted for negative
value in tpm_common_read().

Cc: stable@vger.kernel.org
Fixes: d23d124843 ("tpm: fix invalid locking in NONBLOCKING mode")
Reported-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 20:08:21 +01:00
..
eventlog
st33zp24
Kconfig tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
Makefile tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
tpm-chip.c tpm: Remove a deprecated comments about implicit sysfs locking 2019-09-02 17:08:35 +03:00
tpm-dev-common.c tpm: Handle negative priv->response_len in tpm_common_read() 2020-01-14 20:08:21 +01:00
tpm-dev.c
tpm-dev.h tpm: Handle negative priv->response_len in tpm_common_read() 2020-01-14 20:08:21 +01:00
tpm-interface.c tpm: Wrap the buffer from the caller to tpm_buf in tpm_send() 2019-09-25 02:43:57 +03:00
tpm-sysfs.c tpm: Remove a deprecated comments about implicit sysfs locking 2019-09-02 17:08:35 +03:00
tpm.h
tpm1-cmd.c
tpm2-cmd.c tpm: add check after commands attribs tab allocation 2019-12-17 19:55:50 +01:00
tpm2-space.c
tpm_atmel.c
tpm_atmel.h
tpm_crb.c
tpm_ftpm_tee.c tpm/tpm_ftpm_tee: add shutdown call back 2020-01-12 12:21:41 +01:00
tpm_ftpm_tee.h tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
tpm_i2c_atmel.c
tpm_i2c_infineon.c
tpm_i2c_nuvoton.c
tpm_ibmvtpm.c
tpm_ibmvtpm.h
tpm_infineon.c
tpm_nsc.c
tpm_ppi.c
tpm_tis.c tpm: Switch to platform_get_irq_optional() 2019-12-17 19:55:51 +01:00
tpm_tis_core.c tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's" 2020-01-14 20:08:21 +01:00
tpm_tis_core.h
tpm_tis_spi.c
tpm_vtpm_proxy.c
tpmrm-dev.c
xen-tpmfront.c