ima: prevent kexec_load syscall based on runtime secureboot flag
authorNayna Jain <nayna@linux.ibm.com>
Tue, 9 Oct 2018 17:30:34 +0000 (23:00 +0530)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 11 Dec 2018 12:10:33 +0000 (07:10 -0500)
commitb5ca117365d960fe5e4fe272bcc8142c28769383
tree6e306a5c52ad13271a2d947c9a41922f1ddf709d
parent0914ade209c452cff6a29b1c0ae6fff3167fa1d0
ima: prevent kexec_load syscall based on runtime secureboot flag

When CONFIG_KEXEC_VERIFY_SIG is enabled, the kexec_file_load syscall
requires the kexec'd kernel image to be signed. Distros are concerned
about totally disabling the kexec_load syscall. As a compromise, the
kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIFY_SIG
is configured and the system is booted with secureboot enabled.

This patch disables the kexec_load syscall only for systems booted with
secureboot enabled.

[zohar@linux.ibm.com: add missing mesage on kexec_load failure]
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_main.c