]> www.infradead.org Git - nvme.git/commit
tpm: Address !chip->auth in tpm2_*_auth_session()
authorJarkko Sakkinen <jarkko@kernel.org>
Wed, 3 Jul 2024 16:39:27 +0000 (19:39 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@iki.fi>
Thu, 4 Jul 2024 23:12:27 +0000 (02:12 +0300)
commit25ee48a55fd59c72e0bd46dd9160c2d406b5a497
tree76bdf260edbe90e3bcaaf6a295fbc5dd96822a19
parent661e504db04c6b7278737ee3a9116738536b4ed4
tpm: Address !chip->auth in tpm2_*_auth_session()

Unless tpm_chip_bootstrap() was called by the driver, !chip->auth can cause
a null derefence in tpm2_*_auth_session(). Thus, address !chip->auth in
tpm2_*_auth_session().

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: 699e3efd6c64 ("tpm: Add HMAC session start and end functions")
Tested-by: Michael Ellerman <mpe@ellerman.id.au> # ppc
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm2-sessions.c