linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] support to read and tune appraise mode in runtime
@ 2020-04-09  3:39 Tianjia Zhang
  2020-04-09  3:39 ` [PATCH 1/2] ima: support to read appraise mode Tianjia Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tianjia Zhang @ 2020-04-09  3:39 UTC (permalink / raw)
  To: zohar, dmitry.kasatkin, jmorris, serge, zhangliguang
  Cc: linux-integrity, linux-security-module, linux-kernel

Support the read and write operations of ima_appraise by adding a
securifyfs file 'appraise_mode'.

In order to tune appraise mode in runtime, writing a PKCS#7 signature
corresponding the signed content is required. The content should be off,
enforce, log or fix. Given a simple way to archive this:

$ echo -n off > mode
$ openssl smime -sign -nocerts -noattr -binary \
    -in mode -inkey <system_trusted_key> \
    -signer <cert> -outform der -out mode.p7s
$ sudo cat mode.p7s \
    > /sys/kernel/security/ima/appraise_mode

Note that the signing key must be a trust key located in
system trusted keyring. So even the root privilege cannot
simply disable the enforcement.

Tianjia Zhang (2):
  ima: support to read appraise mode
  ima: support to tune appraise mode in runtime

 security/integrity/ima/ima_fs.c | 134 +++++++++++++++++++++++++++++++-
 1 file changed, 133 insertions(+), 1 deletion(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-15  2:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09  3:39 [PATCH 0/2] support to read and tune appraise mode in runtime Tianjia Zhang
2020-04-09  3:39 ` [PATCH 1/2] ima: support to read appraise mode Tianjia Zhang
2020-04-09  3:39 ` [PATCH 2/2] ima: support to tune appraise mode in runtime Tianjia Zhang
2020-04-09  5:40   ` kbuild test robot
2020-04-13 21:55 ` [PATCH 0/2] support to read and " Mimi Zohar
2020-04-14  3:36   ` Tianjia Zhang
2020-04-14 13:41     ` Mimi Zohar
2020-04-15  2:49       ` Tianjia Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).