All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Fix a couple of issues in TPM related code
@ 2026-09-24  1:25 Stefan Berger
  2026-09-24  1:25 ` [PATCH 01/10] tpm_util: Pass TPMVersion to function writing fatal error response Stefan Berger
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Stefan Berger @ 2026-09-24  1:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: armenon, marcandre.lureau, Stefan Berger

This series of patches fixes various issues in TPM-related code, such as
memory leaks, potential integer underflows, clearing of buffers while they
are in use, and the proper handling of sizes of commands or responses.

Regards,
 Stefan

Stefan Berger (10):
  tpm_util: Pass TPMVersion to function writing fatal error response
  tpm_emulator: Reject TPM responses whose size is too small
  tpm_emulator: Reject sending commands smaller than the request header
  hw/tpm: tis: Only read from response buffer if rw_offset < len
  hw/tpm: tis: Use uint32_t for len to avoid truncating size of command
  hw/tpm: crb: Do not clear internal buffers when backend is busy
  hw/tpm: crb: Avoid potential integer underflow
  hw/tpm: crb: Free ppi.buf in tpm_crb_unrealize
  hw/tpm: crb: Consider response_buffer->len of received response
  tests: Add tests with commands with bad length

 backends/tpm/tpm_emulator.c             | 12 ++++--
 backends/tpm/tpm_passthrough.c          |  2 +-
 backends/tpm/tpm_util.c                 | 12 ++++--
 hw/tpm/tpm_crb.c                        | 23 +++++++---
 hw/tpm/tpm_tis_common.c                 |  8 ++--
 include/system/tpm_util.h               |  3 +-
 tests/qtest/tpm-crb-swtpm-test.c        | 10 +++++
 tests/qtest/tpm-tests.c                 | 56 +++++++++++++++++++++++++
 tests/qtest/tpm-tests.h                 |  8 ++++
 tests/qtest/tpm-tis-device-swtpm-test.c | 10 +++++
 tests/qtest/tpm-tis-swtpm-test.c        | 10 +++++
 tests/qtest/tpm-util.c                  | 55 ++++++++++++++++++++++++
 tests/qtest/tpm-util.h                  |  3 ++
 13 files changed, 196 insertions(+), 16 deletions(-)

-- 
2.55.0



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

end of thread, other threads:[~2026-09-24 13:50 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24  1:25 [PATCH 00/10] Fix a couple of issues in TPM related code Stefan Berger
2026-09-24  1:25 ` [PATCH 01/10] tpm_util: Pass TPMVersion to function writing fatal error response Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24 13:23     ` Stefan Berger
2026-09-24  1:25 ` [PATCH 02/10] tpm_emulator: Reject TPM responses whose size is too small Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24  1:25 ` [PATCH 03/10] tpm_emulator: Reject sending commands smaller than the request header Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24 13:24     ` Stefan Berger
2026-09-24  1:25 ` [PATCH 04/10] hw/tpm: tis: Only read from response buffer if rw_offset < len Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24 13:34     ` Stefan Berger
2026-09-24  1:25 ` [PATCH 05/10] hw/tpm: tis: Use uint32_t for len to avoid truncating size of command Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24  1:25 ` [PATCH 06/10] hw/tpm: crb: Do not clear internal buffers when backend is busy Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24 13:50     ` Stefan Berger
2026-09-24  1:25 ` [PATCH 07/10] hw/tpm: crb: Avoid potential integer underflow Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24  1:25 ` [PATCH 08/10] hw/tpm: crb: Free ppi.buf in tpm_crb_unrealize Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24  1:25 ` [PATCH 09/10] hw/tpm: crb: Consider response_buffer->len of received response Stefan Berger
2026-09-24  7:41   ` marcandre.lureau
2026-09-24  1:25 ` [PATCH 10/10] tests: Add tests with commands with bad length Stefan Berger
2026-09-24  7:41   ` marcandre.lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.