efi stub: accept it if our loaded image has no FilePath field set
authorLennart Poettering <lennart@poettering.net>
Tue, 23 Feb 2021 13:16:08 +0000 (14:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Feb 2021 14:48:48 +0000 (15:48 +0100)
commit685097b9cadf92d21dfa857c3a7ddc1ba115088e
tree0f24ed1253e6775ebfc6fbccf8bfcea0b49f89f3
parente94a009c109bc1ddb7d247e32e4fd6f85770ad39
efi stub: accept it if our loaded image has no FilePath field set

The firmware spec doesn't really say whether FilePath of the LoadedImage
protocol may be NULL or not. So far we assumed it to be non-NULL, but
apparently the FreeBSD UEFI chainloader sets it to NULL. Handle this
gracefully.

(Noticed and tracked down by Alexander Schreiber)

Fixes: #18733
src/boot/efi/stub.c