linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] ima: namespacing IMA audit messages
@ 2017-07-20 22:50 Mehmet Kayaalp
  2017-07-20 22:50 ` [RFC PATCH 1/5] ima: extend clone() with IMA namespace support Mehmet Kayaalp
                   ` (4 more replies)
  0 siblings, 5 replies; 44+ messages in thread
From: Mehmet Kayaalp @ 2017-07-20 22:50 UTC (permalink / raw)
  To: ima-devel
  Cc: containers, linux-kernel, linux-security-module, Tycho Andersen,
	Serge E . Hallyn, Yuqiong Sun, David Safford, Mehmet Kayaalp,
	Stefan Berger, Mehmet Kayaalp

This patch set implements an IMA namespace data structure that gets
created alongside a mount namespace with CLONE_NEWNS, and lays down the
foundation for namespacing the different aspects of IMA (eg. IMA-audit,
IMA-measurement, IMA-appraisal).

The original PoC patches [1], created a new CLONE_NEWIMA flag to
explicitly control when a new IMA namespace should be created. Based on
comments, we elected to hang the IMA namepace off of existing namespaces,
and the mount namespace made the most sense. However, we actually
allocate a new namespace struct in nsproxy, allocate a new inum, and have
an ima symlink in /proc/*/ns/, instead of adding a pointer from the
mnt_namespace. As a result, clone() and unshare() with CLONE_NEWNS
results in a new mount and a new IMA namespace, while setns() called with
the fd of /proc/*/ns/mnt would NOT have the same result. A second setns()
call with the fd /proc/*/ns/ima would be required.

The first patch creates the ima_namespace data, while the second patch
puts the iint->flags in the namespace. The third patch uses these flags
for namespacing the IMA-audit messages, enabling the same file to be
audited each time it is accessed in a new namespace. Rest of the patches
are small fixes and improvements to the audit messages generated by IMA.
Subsequent patch sets will namespace IMA-measurement and IMA-appraisal.

[1] https://sourceforge.net/p/linux-ima/mailman/message/35939754/

Guilherme Magalhaes (1):
  ima: Add ns_mnt, dev, ino fields to IMA audit measurement msgs

Mehmet Kayaalp (2):
  ima: Add ns_status for storing namespaced iint data
  ima: mamespace audit status flags

Mimi Zohar (1):
  ima: differentiate auditing policy rules from "audit" actions

Yuqiong Sun (1):
  ima: extend clone() with IMA namespace support

 fs/proc/namespaces.c                |   3 +
 include/linux/ima.h                 |  40 +++++
 include/linux/nsproxy.h             |   1 +
 include/linux/proc_ns.h             |   2 +
 include/uapi/linux/audit.h          |   3 +-
 init/Kconfig                        |  10 ++
 kernel/nsproxy.c                    |  15 ++
 security/integrity/ima/Makefile     |   1 +
 security/integrity/ima/ima.h        |  49 +++++-
 security/integrity/ima/ima_api.c    |  18 +-
 security/integrity/ima/ima_init.c   |   4 +
 security/integrity/ima/ima_main.c   |  15 +-
 security/integrity/ima/ima_ns.c     | 324 ++++++++++++++++++++++++++++++++++++
 security/integrity/ima/ima_policy.c |   2 +-
 14 files changed, 478 insertions(+), 9 deletions(-)
 create mode 100644 security/integrity/ima/ima_ns.c

-- 
2.9.4

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

end of thread, other threads:[~2018-03-13 21:52 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 22:50 [RFC PATCH 0/5] ima: namespacing IMA audit messages Mehmet Kayaalp
2017-07-20 22:50 ` [RFC PATCH 1/5] ima: extend clone() with IMA namespace support Mehmet Kayaalp
2017-07-25 17:53   ` Serge E. Hallyn
2017-07-25 18:49     ` James Bottomley
2017-07-25 19:04       ` Serge E. Hallyn
2017-07-25 19:08         ` James Bottomley
2017-07-25 19:48           ` Mimi Zohar
2017-07-25 20:11             ` Stefan Berger
2017-07-25 20:46               ` Serge E. Hallyn
2017-07-25 20:57                 ` Mimi Zohar
2017-07-25 21:08                   ` Serge E. Hallyn
2017-07-25 21:28                     ` Mimi Zohar
2017-07-27 12:51                       ` [Linux-ima-devel] " Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 14:39                         ` Mimi Zohar
2017-07-27 17:18                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 17:49                             ` Stefan Berger
2017-07-27 19:39                               ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 20:51                                 ` Stefan Berger
2017-07-28 14:19                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-31 11:31                             ` Mimi Zohar
2017-07-25 21:35                 ` Stefan Berger
2018-03-08 14:04                 ` Stefan Berger
2018-03-09  2:59                   ` Serge E. Hallyn
2018-03-09 13:52                     ` Stefan Berger
2018-03-11 22:58                       ` James Morris
2018-03-13 18:02                         ` Stefan Berger
2018-03-13 21:51                           ` James Morris
2017-07-25 20:31             ` James Bottomley
2017-07-25 20:47               ` Mimi Zohar
2018-03-08 13:39   ` Stefan Berger
2018-03-08 20:19     ` Serge E. Hallyn
     [not found]       ` <a6ef5679-6aef-21de-7cdb-48e8af83f874@linux.vnet.ibm.com>
2018-03-08 23:31         ` Serge E. Hallyn
2017-07-20 22:50 ` [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data Mehmet Kayaalp
2017-07-25 19:43   ` Serge E. Hallyn
2017-07-25 20:15     ` Mimi Zohar
2017-07-25 20:25       ` Stefan Berger
2017-07-25 20:49       ` Serge E. Hallyn
2017-08-11 15:00   ` Stefan Berger
2017-07-20 22:50 ` [RFC PATCH 3/5] ima: mamespace audit status flags Mehmet Kayaalp
2017-08-01 17:17   ` Tycho Andersen
2017-08-01 17:25     ` Mehmet Kayaalp
2017-08-02 21:48       ` Tycho Andersen
2017-07-20 22:50 ` [RFC PATCH 4/5] ima: differentiate auditing policy rules from "audit" actions Mehmet Kayaalp
2017-07-20 22:50 ` [RFC PATCH 5/5] ima: Add ns_mnt, dev, ino fields to IMA audit measurement msgs Mehmet Kayaalp

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).