[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221121072715.836323-1-coxu@redhat.com>
Date: Mon, 21 Nov 2022 15:27:15 +0800
From: Coiby Xu <coxu@...hat.com>
To: kexec@...ts.infradead.org
Cc: Matthew Garrett <mjg59@...f.ucam.org>, Jiri Bohac <jbohac@...e.cz>,
David Howells <dhowells@...hat.com>,
Philipp Rudo <prudo@...hat.com>, linux-s390@...r.kernel.org,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
James Morris <jmorris@...ei.org>,
Matthew Garrett <mjg59@...gle.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] lockdown: s390: kexec_file: don't skip signature verification when not secure IPLed
Currently for s390, lockdown doesn't prevent unsigned kernel image from
being kexec'ed when secure IPL is disabled. Fix it by always verifying
the signature regardless secure IPL is enabled or not.
Fixes: 155bdd30af17 ("kexec_file: Restrict at runtime if the kernel is locked down")
Cc: Matthew Garrett <mjg59@...f.ucam.org>
Cc: Jiri Bohac <jbohac@...e.cz>
Cc: David Howells <dhowells@...hat.com>
Cc: Philipp Rudo <prudo@...hat.com>
Cc: kexec@...ts.infradead.org
Cc: linux-s390@...r.kernel.org
Signed-off-by: Coiby Xu <coxu@...hat.com>
---
arch/s390/kernel/machine_kexec_file.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index fc6d5f58debe..627685426ac2 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -33,10 +33,6 @@ int s390_verify_sig(const char *kernel, unsigned long kernel_len)
unsigned long sig_len;
int ret;
- /* Skip signature verification when not secure IPLed. */
- if (!ipl_secure_flag)
- return 0;
-
if (marker_len > kernel_len)
return -EKEYREJECTED;
--
2.38.1
Powered by blists - more mailing lists