Require signed kernel modules on systems with secure boot mode enabled.
Requiring appended kernel module signatures may be configured, enabled
on the boot command line, or with this patch enabled in secure boot
mode. This patch defines set_module_sig_enforced().
To coordinate between appended kernel module signatures and IMA
signatures, only define an IMA MODULE_CHECK policy rule if
CONFIG_MODULE_SIG is not enabled.
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
Changelog:
- Removed new "sig_required" flag and associated functions, directly set
sig_enforce.
arch/x86/kernel/ima_arch.c | 9 ++++++++-
include/linux/module.h | 1 +
kernel/module.c | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)
From: Luis Chamberlain <mcgrof@kernel.org> Date: 2019-02-14 17:58:31
On Wed, Feb 13, 2019 at 07:17:59AM -0500, Mimi Zohar wrote:
Require signed kernel modules on systems with secure boot mode enabled.
Requiring appended kernel module signatures may be configured, enabled
on the boot command line, or with this patch enabled in secure boot
mode.
But only if IMA is enabled? If so, should this statement be true if
IMA is disabled?
Either way, this is not clear from the commit log and code, can the
commit log be clear if set_module_sig_enforced() will be set if
IMA is disabled but secure boot mode enabled?
quoted hunk
This patch defines set_module_sig_enforced().
To coordinate between appended kernel module signatures and IMA
signatures, only define an IMA MODULE_CHECK policy rule if
CONFIG_MODULE_SIG is not enabled.
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
Changelog:
- Removed new "sig_required" flag and associated functions, directly set
sig_enforce.
arch/x86/kernel/ima_arch.c | 9 ++++++++-
include/linux/module.h | 1 +
kernel/module.c | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)
On Thu, 2019-02-14 at 09:58 -0800, Luis Chamberlain wrote:
On Wed, Feb 13, 2019 at 07:17:59AM -0500, Mimi Zohar wrote:
quoted
Require signed kernel modules on systems with secure boot mode enabled.
Requiring appended kernel module signatures may be configured, enabled
on the boot command line, or with this patch enabled in secure boot
mode.
But only if IMA is enabled?
The patch subject line indicates this is for IMA, but sure I can amend
the patch description, making it clearer.
If so, should this statement be true if
IMA is disabled?
This patch coordinates the PE and IMA signatures so that both
signature types aren't required. Only if
"CONFIG_KEXEC_VERIFY_SIGNATURE" is not enabled, is an IMA policy rule
defined. A custom IMA policy can still define an IMA kexec rule,
requiring an IMA signature, even if the PE signature is required.
For the case when IMA is disabled and PE signatures are required, then
there isn't a problem. The issue is when neither signature
verification method is enabled. I'll leave that for someone else to
address.
Either way, this is not clear from the commit log and code, can the
commit log be clear if set_module_sig_enforced() will be set if
IMA is disabled but secure boot mode enabled?
quoted
This patch defines set_module_sig_enforced().
To coordinate between appended kernel module signatures and IMA
signatures, only define an IMA MODULE_CHECK policy rule if
CONFIG_MODULE_SIG is not enabled.
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
Changelog:
- Removed new "sig_required" flag and associated functions, directly set
sig_enforce.
arch/x86/kernel/ima_arch.c | 9 ++++++++-
include/linux/module.h | 1 +
kernel/module.c | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)