linux/drivers/char/tpm
Jarkko Sakkinen 7ca110f267 tpm: Address !chip->auth in tpm_buf_append_hmac_session*()
Unless tpm_chip_bootstrap() was called by the driver, !chip->auth can
cause a null derefence in tpm_buf_hmac_session*().  Thus, address
!chip->auth in tpm_buf_hmac_session*() and remove the fallback
implementation for !TCG_TPM2_HMAC.

Cc: stable@vger.kernel.org # v6.9+
Reported-by: Stefan Berger <stefanb@linux.ibm.com>
Closes: https://lore.kernel.org/linux-integrity/20240617193408.1234365-1-stefanb@linux.ibm.com/
Fixes: 1085b8276b ("tpm: Add the rest of the session HMAC API")
Tested-by: Michael Ellerman <mpe@ellerman.id.au> # ppc
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2024-07-05 02:12:27 +03:00
..
eventlog tpm/eventlog: remove redundant assignment to variabel ret 2024-05-09 22:30:50 +03:00
st33zp24 Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
Kconfig tpm: Enable TCG_TPM2_HMAC by default only for X86_64 2024-05-28 13:14:29 +03:00
Makefile tpm: Address !chip->auth in tpm_buf_append_name() 2024-07-05 02:12:27 +03:00
tpm1-cmd.c
tpm2-cmd.c tpm: Open code tpm_buf_parameters() 2024-05-28 13:03:57 +03:00
tpm2-sessions.c tpm: Address !chip->auth in tpm_buf_append_hmac_session*() 2024-07-05 02:12:27 +03:00
tpm2-space.c tpm: disable the TPM if NULL name changes 2024-05-09 22:30:52 +03:00
tpm_atmel.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
tpm_atmel.h tpm: atmel: Add explicit include for of.h 2023-04-06 20:36:27 +02:00
tpm_crb.c tpm: Enable hwrng only for Pluton on AMD CPUs 2023-09-04 21:57:59 +03:00
tpm_ftpm_tee.c tpm/tpm_ftpm_tee: fix all kernel-doc warnings 2024-03-12 00:26:05 +02:00
tpm_ftpm_tee.h
tpm_i2c_atmel.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_i2c_infineon.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_i2c_nuvoton.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
tpm_ibmvtpm.c
tpm_ibmvtpm.h
tpm_infineon.c char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n 2024-05-09 22:30:50 +03:00
tpm_nsc.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
tpm_ppi.c char: move from strlcpy with unused retval to strscpy 2022-10-05 00:25:56 +03:00
tpm_tis_core.c tpm_tis: Do *not* flush uninitialized work 2024-06-05 01:18:01 +03:00
tpm_tis_core.h tpm: Switch to new Intel CPU model defines 2024-06-05 04:55:04 +03:00
tpm_tis_i2c_cr50.c tpm: cr50: fix kernel-doc warning and spelling 2024-01-09 11:12:27 +02:00
tpm_tis_i2c.c tpm: tis_i2c: Add compatible string nuvoton,npct75x 2024-03-12 00:26:06 +02:00
tpm_tis_spi_cr50.c
tpm_tis_spi_main.c tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer 2024-05-28 13:03:57 +03:00
tpm_tis_spi.h
tpm_tis_synquacer.c Devicetree include cleanups for v6.6: 2023-08-30 17:04:28 -07:00
tpm_tis.c - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
tpm_vtpm_proxy.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
tpm-buf.c tpm: Open code tpm_buf_parameters() 2024-05-28 13:03:57 +03:00
tpm-chip.c tpm: disable the TPM if NULL name changes 2024-05-09 22:30:52 +03:00
tpm-dev-common.c timers: Get rid of del_singleshot_timer_sync() 2022-11-24 15:09:10 +01:00
tpm-dev.c
tpm-dev.h
tpm-interface.c tpm: Store the length of the tpm_buf data separately. 2024-05-09 22:30:51 +03:00
tpm-sysfs.c tpm: add the null key name as a sysfs export 2024-05-09 22:30:52 +03:00
tpm.h tpm: Switch to new Intel CPU model defines 2024-06-05 04:55:04 +03:00
tpmrm-dev.c
xen-tpmfront.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00