ima: force signature verification when CONFIG_KEXEC_SIG is configured
[ Upstream commit af16df54b89dee72df253abc5e7b5e8a6d16c11c ]
Currently, an unsigned kernel could be kexec'ed when IMA arch specific
policy is configured unless lockdown is enabled. Enforce kernel
signature verification check in the kexec_file_load syscall when IMA
arch specific policy is configured.
Fixes: 99d5cadfde
("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE")
Reported-and-suggested-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
29c6a632f8
commit
eb360267e1
@@ -442,6 +442,12 @@ static inline int kexec_crash_loaded(void) { return 0; }
|
||||
#define kexec_in_progress false
|
||||
#endif /* CONFIG_KEXEC_CORE */
|
||||
|
||||
#ifdef CONFIG_KEXEC_SIG
|
||||
void set_kexec_sig_enforced(void);
|
||||
#else
|
||||
static inline void set_kexec_sig_enforced(void) {}
|
||||
#endif
|
||||
|
||||
#endif /* !defined(__ASSEBMLY__) */
|
||||
|
||||
#endif /* LINUX_KEXEC_H */
|
||||
|
Reference in New Issue
Block a user