019c0941b8
The value of tpm_handle changes between successive calls to grub_tpm_handle_find(), as instead of simply copying the stored pointer we end up taking the address of said pointer when using the cached value of grub_tpm_handle. This causes grub_efi_open_protocol() to return a nullptr in grub_tpm2_execute() and grub_tpm2_log_event(). Said nullptr goes unchecked and efi_call_5(tpm->hash_log_extend_event,...) ends up jumping to 0x0, Qemu crashes once video ROM is reached at 0xb0000. This patch seems to do the trick of fixing that bug, but we should also ensure that all calls to grub_efi_open_protocol() are checked so that we don't start executing low memory. Signed-off-by: Max Tottenham <mtottenh@akamai.com> Reviewed-by: Matthew Garrett <mjg59@google.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
.. | ||
arc | ||
efi | ||
i386 | ||
ieee1275 | ||
mips/loongson | ||
xen | ||
acpi.c | ||
acpihalt.c | ||
blocklist.c | ||
boot.c | ||
boottime.c | ||
cacheinfo.c | ||
cat.c | ||
cmp.c | ||
configfile.c | ||
date.c | ||
echo.c | ||
eval.c | ||
extcmd.c | ||
file.c | ||
file32.c | ||
file64.c | ||
fileXX.c | ||
fwconfig.c | ||
gptprio.c | ||
gptrepair.c | ||
gptsync.c | ||
halt.c | ||
hashsum.c | ||
hdparm.c | ||
help.c | ||
hexdump.c | ||
iorw.c | ||
keylayouts.c | ||
keystatus.c | ||
legacycfg.c | ||
loadenv.c | ||
ls.c | ||
lsacpi.c | ||
lsmmap.c | ||
lspci.c | ||
macbless.c | ||
memrw.c | ||
menuentry.c | ||
minicmd.c | ||
nativedisk.c | ||
parttool.c | ||
password.c | ||
password_pbkdf2.c | ||
pcidump.c | ||
pgp.c | ||
probe.c | ||
read.c | ||
reboot.c | ||
regexp.c | ||
search.c | ||
search_disk_uuid.c | ||
search_file.c | ||
search_label.c | ||
search_part_label.c | ||
search_part_uuid.c | ||
search_uuid.c | ||
search_wrap.c | ||
setpci.c | ||
sleep.c | ||
smbios.c | ||
syslinuxcfg.c | ||
terminal.c | ||
test.c | ||
testload.c | ||
testspeed.c | ||
time.c | ||
tpm.c | ||
tr.c | ||
true.c | ||
usbtest.c | ||
verifiers.c | ||
videoinfo.c | ||
videotest.c | ||
wildcard.c | ||
xnu_uuid.c |