]> www.infradead.org Git - users/willy/linux.git/commit
x86/ima: define arch_get_ima_policy() for x86
authorEric Richter <erichte@linux.ibm.com>
Tue, 9 Oct 2018 17:30:37 +0000 (23:00 +0530)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 13 Nov 2018 12:38:45 +0000 (07:38 -0500)
commit2bfaa38ed2c78b7e5440f6d60e6c14160ffabf69
tree5f7c136cb916e567f1fb0acf31f2fa0fe7581aba
parentea32c8fb1ddde2ebf04d5108e7c301232a80bfbd
x86/ima: define arch_get_ima_policy() for x86

On x86, there are two methods of verifying a kexec'ed kernel image
signature being loaded via the kexec_file_load syscall - an architecture
specific implementaton or a IMA KEXEC_KERNEL_CHECK appraisal rule. Neither
of these methods verify the kexec'ed kernel image signature being loaded
via the kexec_load syscall.

Secure boot enabled systems require kexec images to be signed. Therefore,
this patch loads an IMA KEXEC_KERNEL_CHECK policy rule on secure boot
enabled systems not configured with CONFIG_KEXEC_VERIFY_SIG enabled.

When IMA_APPRAISE_BOOTPARAM is configured, different IMA appraise modes
(eg. fix, log) can be specified on the boot command line, allowing unsigned
or invalidly signed kernel images to be kexec'ed. This patch permits
enabling IMA_APPRAISE_BOOTPARAM or IMA_ARCH_POLICY, but not both.

Signed-off-by: Eric Richter <erichte@linux.ibm.com>
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>
arch/x86/kernel/ima_arch.c
include/linux/ima.h
security/integrity/ima/Kconfig