mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] libstub,tpm: fix small bugs and improve error reporting
@ 2024-09-13 23:19 Gregory Price
  2024-09-13 23:19 ` [PATCH v2 1/4] tpm: fix signed/unsigned bug when checking event logs Gregory Price
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Gregory Price @ 2024-09-13 23:19 UTC (permalink / raw)
  To: linux-efi
  Cc: linux-kernel, ardb, leitao, usamaarif642,
	sathyanarayanan.kuppuswamy, ilias.apalodimas

The efi/tpm code has a number of small signed/unsigned bugs and
inaccuracies are prone to cause further bugs in a difficult to
debug manner.  For example, there is a signed/unsigned mismatch
in efi/tpm.c that can lead to calling memblock_reserve on a range
with an effectively negative length.

Additionally, there are silently ignored error conditions may
result in undefined behavior.  Address these.

Signed-off-by: Gregory Price <gourry@gourry.net>

Gregory Price (4):
  tpm: fix signed/unsigned bug when checking event logs
  tpm: do not ignore memblock_reserve return value
  tpm: fix unsigned/signed mismatch errors related to
    __calc_tpm2_event_size
  libstub,tpm: do not ignore failure case when reading final event log

 drivers/firmware/efi/libstub/tpm.c |  9 ++++++---
 drivers/firmware/efi/tpm.c         | 26 ++++++++++++++++----------
 include/linux/tpm_eventlog.h       |  2 +-
 3 files changed, 23 insertions(+), 14 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-10-15 18:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-13 23:19 [PATCH v2 0/4] libstub,tpm: fix small bugs and improve error reporting Gregory Price
2024-09-13 23:19 ` [PATCH v2 1/4] tpm: fix signed/unsigned bug when checking event logs Gregory Price
2024-09-23  6:57   ` Ilias Apalodimas
2024-09-13 23:19 ` [PATCH v2 2/4] tpm: do not ignore memblock_reserve return value Gregory Price
2024-09-16  8:29   ` Ard Biesheuvel
2024-09-16 10:47     ` Usama Arif
2024-09-13 23:19 ` [PATCH v2 3/4] tpm: fix unsigned/signed mismatch errors related to __calc_tpm2_event_size Gregory Price
2024-09-13 23:19 ` [PATCH v2 4/4] libstub,tpm: do not ignore failure case when reading final event log Gregory Price
2024-10-15 18:29 ` [PATCH v2 0/4] libstub,tpm: fix small bugs and improve error reporting Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®