linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Address !chip->auth
@ 2024-07-03 18:24 Jarkko Sakkinen
  2024-07-03 18:24 ` [PATCH v2 1/3] tpm: Address !chip->auth in tpm2_*_auth_session() Jarkko Sakkinen
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jarkko Sakkinen @ 2024-07-03 18:24 UTC (permalink / raw)
  To: linux-integrity
  Cc: Thorsten Leemhuis, Linus Torvalds, Jarkko Sakkinen,
	James Bottomley, Mimi Zohar, David Howells, Paul Moore,
	James Morris, Serge E. Hallyn, keyrings, linux-security-module,
	linux-kernel

Unless tpm2_sessions_init() is called, then chip->auth ends up being a null
pointer, which is ignored by authenticated sessions code. These patches aim
to fully address the bug, and hopefully still make into 6.10-rc7.

Tested on x86-64 with:

- TCG_TPM2_HMAC disabled.
- TCG_TPM2_HMAC enabled.
- TCG_TPM2_HMAC enabled, and "/* rc = tpm2_sessions_init(chip); */".

v2:
- Rebase to commit 8a9c6c40432e ("Merge tag 'io_uring-6.10-20240703' of git://git.kernel.dk/linux").
- Couple of cosmetic fixes.

Jarkko Sakkinen (3):
  tpm: Address !chip->auth in tpm2_*_auth_session()
  tpm: Address !chip->auth in tpm_buf_append_name()
  tpm: Address !chip->auth in tpm_buf_append_hmac_session*()

 drivers/char/tpm/Makefile        |   2 +-
 drivers/char/tpm/tpm2-sessions.c | 400 +++++++++++++++++--------------
 include/linux/tpm.h              |  75 ++----
 3 files changed, 245 insertions(+), 232 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-07-05 15:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 18:24 [PATCH v2 0/3] Address !chip->auth Jarkko Sakkinen
2024-07-03 18:24 ` [PATCH v2 1/3] tpm: Address !chip->auth in tpm2_*_auth_session() Jarkko Sakkinen
2024-07-03 18:24 ` [PATCH v2 2/3] tpm: Address !chip->auth in tpm_buf_append_name() Jarkko Sakkinen
2024-07-03 20:11   ` James Bottomley
2024-07-04  6:53     ` Jarkko Sakkinen
2024-07-04 17:07     ` Linus Torvalds
2024-07-04 17:21       ` James Bottomley
2024-07-04 18:05         ` Jarkko Sakkinen
2024-07-03 18:24 ` [PATCH v2 3/3] tpm: Address !chip->auth in tpm_buf_append_hmac_session*() Jarkko Sakkinen
2024-07-04  1:56   ` Stefan Berger
2024-07-04  6:41     ` Jarkko Sakkinen
2024-07-05 14:05       ` Stefan Berger
2024-07-05 14:35         ` Jarkko Sakkinen
2024-07-05 15:04           ` Jarkko Sakkinen
2024-07-04  6:52     ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).