mbox series

[0/1,SRU,OEM-5.6] Fix system boot hang at efi_tpm_eventlog_init

Message ID 20200825083621.310249-1-vicamo.yang@canonical.com
Headers show
Series Fix system boot hang at efi_tpm_eventlog_init | expand


You-Sheng Yang Aug. 25, 2020, 8:36 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1892827

Some systems may hang at boot. With "earlycon=efifb", more debug
messages for EFI are dumpped. Last call trace as:

  RIP: 0010:efi_tpm_eventlog_init+0x1aa/0x2a2
  Call Trace:
   ? e820__print_table+0x65/0x6e

This affects all mainline kernel since v5.2 to v5.7.6. Fix available in
v5.8-rc3 and has been backported to v5.7.7, v5.4.50.

Commit ea3cdcaa43b0 ("efi/tpm: Verify event log header before parsing")
fixes commit 6b0326190205 ("efi: Attempt to get the TCG2 event log in
the boot stub").

[Test Case]
So far it can be easily reproduced with a green installation of Focal on
USB key on a few Dell platforms.

[Regression Potential]
Low. This checks validity of tmp event log header before parsing them,
so it affects only platforms might generate invalid entries only.

[Other Info]
This affects -generic for eoan and oem-5.6 for focal, but the former has
be EOL-ed.

Fabian Vogt (1):
  efi/tpm: Verify event log header before parsing

 include/linux/tpm_eventlog.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)