]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.69/fix-kexec-forbidding-kernels-signed-with-keys-in-the-secondary-keyring-to-boot.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.69 / fix-kexec-forbidding-kernels-signed-with-keys-in-the-secondary-keyring-to-boot.patch
CommitLineData
bed0f502
GKH
1From ea93102f32244e3f45c8b26260be77ed0cc1d16c Mon Sep 17 00:00:00 2001
2From: Yannik Sembritzki <yannik@sembritzki.me>
3Date: Thu, 16 Aug 2018 14:05:23 +0100
4Subject: Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
5
6From: Yannik Sembritzki <yannik@sembritzki.me>
7
8commit ea93102f32244e3f45c8b26260be77ed0cc1d16c upstream.
9
10The split of .system_keyring into .builtin_trusted_keys and
11.secondary_trusted_keys broke kexec, thereby preventing kernels signed by
12keys which are now in the secondary keyring from being kexec'd.
13
14Fix this by passing VERIFY_USE_SECONDARY_KEYRING to
15verify_pefile_signature().
16
17Fixes: d3bfe84129f6 ("certs: Add a secondary system keyring that can be added to dynamically")
18Signed-off-by: Yannik Sembritzki <yannik@sembritzki.me>
19Signed-off-by: David Howells <dhowells@redhat.com>
20Cc: kexec@lists.infradead.org
21Cc: keyrings@vger.kernel.org
22Cc: linux-security-module@vger.kernel.org
23Cc: stable@kernel.org
24Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27---
28 arch/x86/kernel/kexec-bzimage64.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31--- a/arch/x86/kernel/kexec-bzimage64.c
32+++ b/arch/x86/kernel/kexec-bzimage64.c
33@@ -532,7 +532,7 @@ static int bzImage64_cleanup(void *loade
34 static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
35 {
36 return verify_pefile_signature(kernel, kernel_len,
37- NULL,
38+ VERIFY_USE_SECONDARY_KEYRING,
39 VERIFYING_KEXEC_PE_SIGNATURE);
40 }
41 #endif