]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/ima: Check EFI_RUNTIME_SERVICES before using
authorScott Wood <swood@redhat.com>
Tue, 23 Apr 2019 22:48:07 +0000 (17:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jun 2019 07:16:14 +0000 (09:16 +0200)
commitc59e2a64128e30a16394b2fa09b7470c2e2f6f68
treec3071b9e4dc1480e238b1ea1aa4e1a188badfdcd
parentbd411a6249654e42ff5d5372e84c2db4adeebddb
x86/ima: Check EFI_RUNTIME_SERVICES before using

commit 558b523d46289f111d53d7c42211069063be5985 upstream.

Checking efi_enabled(EFI_BOOT) is not sufficient to ensure that
EFI runtime services are available, e.g. if efi=noruntime is used.

Without this, I get an oops on a PREEMPT_RT kernel where efi=noruntime is
the default.

Fixes: 399574c64eaf94e8 ("x86/ima: retry detecting secure boot mode")
Cc: stable@vger.kernel.org (linux-5.0)
Signed-off-by: Scott Wood <swood@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/ima_arch.c