From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: zohar@linux.ibm.com, stephen.smalley.work@gmail.com,
paul@paul-moore.com, omosnace@redhat.com
Cc: tyhicks@linux.microsoft.com, tusharsu@linux.microsoft.com,
sashal@kernel.org, linux-integrity@vger.kernel.org,
selinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/1] selinux: Measure state and hash of policy using IMA
Date: Sat, 26 Sep 2020 09:39:59 -0700 [thread overview]
Message-ID: <20200926164000.2926-1-nramas@linux.microsoft.com> (raw)
Critical data structures of security modules are currently not measured.
Therefore an attestation service, for instance, would not be able to
attest whether the security modules are always operating with the policies
and configurations that the system administrator had setup. The policies
and configurations for the security modules could be tampered by rogue
user mode agents or modified through some inadvertent actions on
the system. Measuring such critical data would enable an attestation
service to reliably assess the security configuration of the system.
SELinux configuration and policy are some of the critical data for this
security module that need to be measured. This measurement can be used
by an attestation service, for instance, to verify if the configurations
and policies have been setup correctly and that they haven't been
tampered at run-time.
This patch set adds support for measuring SELinux configuration,
policy capabilities settings, and the hash of the loaded policy by
calling the IMA hook ima_measure_critical_data().
Since the size of the loaded policy can be large (several MB), hash
of the policy is measured instead of the entire policy to avoid
bloating the IMA log entry.
This patch is based on commit 8861d0af642c ("selinux: Add helper functions to get and set checkreqprot")
in "next" branch in https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
This patch is dependent on the following patch series and must be
applied in the given order:
1, https://patchwork.kernel.org/patch/11709527/
2, https://patchwork.kernel.org/patch/11795559/
3, https://patchwork.kernel.org/patch/11801525/
Lakshmi Ramasubramanian (1):
selinux: Measure state and hash of policy using IMA
security/integrity/ima/ima.h | 1 +
security/integrity/ima/ima_queue_data.c | 5 +-
security/selinux/Makefile | 2 +
security/selinux/hooks.c | 3 +
security/selinux/include/security.h | 11 +-
security/selinux/measure.c | 154 ++++++++++++++++++++++++
security/selinux/selinuxfs.c | 9 ++
security/selinux/ss/services.c | 71 +++++++++--
8 files changed, 244 insertions(+), 12 deletions(-)
create mode 100644 security/selinux/measure.c
--
2.28.0
next reply other threads:[~2020-09-26 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 16:39 Lakshmi Ramasubramanian [this message]
2020-09-26 16:40 ` [PATCH 1/1] selinux: Measure state and hash of policy using IMA Lakshmi Ramasubramanian
2020-09-28 16:29 ` Stephen Smalley
2020-09-29 5:50 ` Lakshmi Ramasubramanian
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=20200926164000.2926-1-nramas@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sashal@kernel.org \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
--cc=tusharsu@linux.microsoft.com \
--cc=tyhicks@linux.microsoft.com \
--cc=zohar@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox