From: "Bruno E. O. Meneguele" <brdeoliv@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-security-module@vger.kernel.org,
linux-integrity@vger.kernel.org, serge@hallyn.com,
james.l.morris@oracle.com, dmitry.kasatkin@gmail.com,
zohar@linux.vnet.ibm.com, rusty@rustcorp.com.au, jeyu@kernel.org
Subject: [PATCH v2 0/2] ima: change how MODULE_SIG_FORCE is checked on modules checking policy
Date: Mon, 23 Oct 2017 14:43:00 -0200 [thread overview]
Message-ID: <cover.1508776704.git.brdeoliv@redhat.com> (raw)
This patchset ensure that IMA's modules checking policy:
measure func=MODULE_CHECK uid=0
rely on the correct value of CONFIG_MODULE_SIG_FORCE, since the way it
is today the code completely ignores the module.sig_enforce cmdline
param, which behaves in a OR logic with the CONFIG value
(CONFIG_MODULE_SIG_FORCE || module.sig_enforce). That said, everytime a
module would load, in the current checking code, when the kernel was not
compiled with the CONFIG set the call to init_module syscall fails with
-EACCES:
# strace -f -v modprobe <any-module> | grep init_module
init_module(0x55b9bcc9bba0, 17763, "") = -1 EACCES (Permission denied)
With this patchset the result would rely on the module.sig_enforce
cmdline as well. Once the CONFIG is not set, but the param is, the
result would be 'success', as it should be:
# strace -f -v modprobe <any-module> | grep init_module
init_module(0x7f9602d6e010, 386646, "") = 0
The patchset was tested in two different kernels: 4.13.6 (Fedora 27) and
4.14.0-rc4 (integrity-next tree)
Bruno E. O. Meneguele (2):
module: export module signature enforcement status
ima: check signature enforcement against cmdline param instead of
CONFIG
include/linux/module.h | 2 ++
kernel/module.c | 10 ++++++++++
security/integrity/ima/ima_main.c | 6 +++---
3 files changed, 15 insertions(+), 3 deletions(-)
--
2.13.6
WARNING: multiple messages have this Message-ID (diff)
From: brdeoliv@redhat.com (Bruno E. O. Meneguele)
To: linux-security-module@vger.kernel.org
Subject: [PATCH v2 0/2] ima: change how MODULE_SIG_FORCE is checked on modules checking policy
Date: Mon, 23 Oct 2017 14:43:00 -0200 [thread overview]
Message-ID: <cover.1508776704.git.brdeoliv@redhat.com> (raw)
This patchset ensure that IMA's modules checking policy:
measure func=MODULE_CHECK uid=0
rely on the correct value of CONFIG_MODULE_SIG_FORCE, since the way it
is today the code completely ignores the module.sig_enforce cmdline
param, which behaves in a OR logic with the CONFIG value
(CONFIG_MODULE_SIG_FORCE || module.sig_enforce). That said, everytime a
module would load, in the current checking code, when the kernel was not
compiled with the CONFIG set the call to init_module syscall fails with
-EACCES:
# strace -f -v modprobe <any-module> | grep init_module
init_module(0x55b9bcc9bba0, 17763, "") = -1 EACCES (Permission denied)
With this patchset the result would rely on the module.sig_enforce
cmdline as well. Once the CONFIG is not set, but the param is, the
result would be 'success', as it should be:
# strace -f -v modprobe <any-module> | grep init_module
init_module(0x7f9602d6e010, 386646, "") = 0
The patchset was tested in two different kernels: 4.13.6 (Fedora 27) and
4.14.0-rc4 (integrity-next tree)
Bruno E. O. Meneguele (2):
module: export module signature enforcement status
ima: check signature enforcement against cmdline param instead of
CONFIG
include/linux/module.h | 2 ++
kernel/module.c | 10 ++++++++++
security/integrity/ima/ima_main.c | 6 +++---
3 files changed, 15 insertions(+), 3 deletions(-)
--
2.13.6
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-10-23 16:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 16:43 Bruno E. O. Meneguele [this message]
2017-10-23 16:43 ` [PATCH v2 0/2] ima: change how MODULE_SIG_FORCE is checked on modules checking policy Bruno E. O. Meneguele
2017-10-23 16:43 ` [PATCH v2 1/2] module: export module signature enforcement status Bruno E. O. Meneguele
2017-10-23 16:43 ` Bruno E. O. Meneguele
2017-10-23 16:43 ` [PATCH v2 2/2] ima: check signature enforcement against cmdline param instead of CONFIG Bruno E. O. Meneguele
2017-10-23 16:43 ` Bruno E. O. Meneguele
2017-10-24 10:41 ` kbuild test robot
2017-10-24 10:41 ` kbuild test robot
2017-10-24 10:41 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1508776704.git.brdeoliv@redhat.com \
--to=brdeoliv@redhat.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=james.l.morris@oracle.com \
--cc=jeyu@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=serge@hallyn.com \
--cc=zohar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.