All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] ima: namespacing IMA audit messages
@ 2017-07-20 22:50 ` Mehmet Kayaalp
  0 siblings, 0 replies; 131+ 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] 131+ messages in thread

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

Thread overview: 131+ 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 ` Mehmet Kayaalp
2017-07-20 22:50 ` [RFC PATCH 1/5] ima: extend clone() with IMA namespace support Mehmet Kayaalp
2017-07-20 22:50   ` Mehmet Kayaalp
     [not found]   ` <20170720225033.21298-2-mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 17:53     ` Serge E. Hallyn
2017-07-25 17:53       ` Serge E. Hallyn
2017-07-25 17:53       ` Serge E. Hallyn
     [not found]       ` <20170725175317.GA727-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2017-07-25 18:49         ` James Bottomley
2017-07-25 18:49       ` James Bottomley
2017-07-25 18:49         ` James Bottomley
     [not found]         ` <1501008554.3689.30.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-07-25 19:04           ` Serge E. Hallyn
2017-07-25 19:04             ` Serge E. Hallyn
2017-07-25 19:04             ` Serge E. Hallyn
2017-07-25 19:08             ` James Bottomley
2017-07-25 19:08               ` James Bottomley
2017-07-25 19:48               ` Mimi Zohar
2017-07-25 19:48                 ` Mimi Zohar
     [not found]                 ` <1501012082.27413.17.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 20:11                   ` Stefan Berger
2017-07-25 20:11                     ` Stefan Berger
2017-07-25 20:11                     ` Stefan Berger
     [not found]                     ` <645db815-7773-e351-5db7-89f38cd88c3d-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 20:46                       ` Serge E. Hallyn
2017-07-25 20:46                         ` Serge E. Hallyn
2017-07-25 20:46                         ` Serge E. Hallyn
     [not found]                         ` <20170725204622.GA4969-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2017-07-25 20:57                           ` Mimi Zohar
2017-07-25 20:57                             ` Mimi Zohar
2017-07-25 20:57                             ` Mimi Zohar
     [not found]                             ` <1501016277.27413.50.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 21:08                               ` Serge E. Hallyn
2017-07-25 21:08                             ` Serge E. Hallyn
2017-07-25 21:08                               ` Serge E. Hallyn
     [not found]                               ` <20170725210801.GA5628-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2017-07-25 21:28                                 ` Mimi Zohar
2017-07-25 21:28                                   ` Mimi Zohar
2017-07-25 21:28                                   ` Mimi Zohar
     [not found]                                   ` <1501018134.27413.66.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-27 12:51                                     ` [Linux-ima-devel] " Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 12:51                                       ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 12:51                                       ` Magalhaes, Guilherme (Brazil R&D-CL)
     [not found]                                       ` <TU4PR84MB03021F7FDF1B89ECAA8F7FFFFFBE0-cn0wsXH2uUebani3oaRudNicc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2017-07-27 14:39                                         ` Mimi Zohar
2017-07-27 14:39                                       ` Mimi Zohar
2017-07-27 14:39                                         ` Mimi Zohar
     [not found]                                         ` <1501166369.28419.171.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-27 17:18                                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-28 14:19                                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 17:18                                         ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 17:18                                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 17:49                                           ` Stefan Berger
2017-07-27 17:49                                             ` Stefan Berger
     [not found]                                             ` <3c3d8594-9958-5f53-ec0b-f33c36967f95-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-27 19:39                                               ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 19:39                                             ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 19:39                                               ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-27 20:51                                               ` Stefan Berger
2017-07-27 20:51                                                 ` Stefan Berger
     [not found]                                               ` <TU4PR84MB030243E7071B5A7455334886FFBE0-cn0wsXH2uUebani3oaRudNicc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2017-07-27 20:51                                                 ` Stefan Berger
     [not found]                                           ` <TU4PR84MB03025AD26718A173FB3E3F94FFBE0-cn0wsXH2uUebani3oaRudNicc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2017-07-27 17:49                                             ` Stefan Berger
2017-07-28 14:19                                         ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-28 14:19                                           ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-07-31 11:31                                           ` Mimi Zohar
2017-07-31 11:31                                             ` Mimi Zohar
     [not found]                                           ` <TU4PR84MB03025BC4B8DEC44A0D63A298FFBF0-cn0wsXH2uUebani3oaRudNicc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2017-07-31 11:31                                             ` Mimi Zohar
2017-07-25 21:35                           ` Stefan Berger
2017-07-25 21:35                             ` Stefan Berger
2017-07-25 21:35                             ` Stefan Berger
2018-03-08 14:04                           ` Stefan Berger
2018-03-08 14:04                         ` Stefan Berger
2018-03-08 14:04                           ` Stefan Berger
     [not found]                           ` <97839865-b0ab-8e5d-114e-0603ef2edf6f-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-09  2:59                             ` Serge E. Hallyn
2018-03-09  2:59                           ` Serge E. Hallyn
2018-03-09  2:59                             ` Serge E. Hallyn
     [not found]                             ` <20180309025942.GA15295-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2018-03-09 13:52                               ` Stefan Berger
2018-03-09 13:52                                 ` Stefan Berger
2018-03-09 13:52                                 ` Stefan Berger
     [not found]                                 ` <ec137677-34f8-df91-0d1c-6c6d6c951496-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-11 22:58                                   ` James Morris
2018-03-11 22:58                                 ` James Morris
2018-03-11 22:58                                   ` James Morris
     [not found]                                   ` <alpine.LRH.2.21.1803120953310.26512-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>
2018-03-13 18:02                                     ` Stefan Berger
2018-03-13 18:02                                       ` Stefan Berger
2018-03-13 18:02                                       ` Stefan Berger
     [not found]                                       ` <c39350db-046f-ea70-15e4-210884548b1e-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-13 21:51                                         ` James Morris
2018-03-13 21:51                                           ` James Morris
2018-03-13 21:51                                           ` James Morris
2017-07-25 20:31                   ` James Bottomley
2017-07-25 20:31                 ` James Bottomley
2017-07-25 20:31                   ` James Bottomley
     [not found]                   ` <1501014695.3689.41.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-07-25 20:47                     ` Mimi Zohar
2017-07-25 20:47                       ` Mimi Zohar
2017-07-25 20:47                       ` Mimi Zohar
     [not found]               ` <1501009739.3689.33.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-07-25 19:48                 ` Mimi Zohar
     [not found]             ` <20170725190406.GA1883-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2017-07-25 19:08               ` James Bottomley
2018-03-08 13:39     ` Stefan Berger
2018-03-08 13:39   ` Stefan Berger
2018-03-08 13:39     ` Stefan Berger
     [not found]     ` <2fac8414-6957-1fce-6b40-ad4b687ca83c-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-08 20:19       ` Serge E. Hallyn
2018-03-08 20:19     ` Serge E. Hallyn
2018-03-08 20:19       ` Serge E. Hallyn
     [not found]       ` <20180308201931.GA6462-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2018-03-08 22:53         ` Stefan Berger
2018-03-08 23:31           ` Serge E. Hallyn
2018-03-08 23:31             ` Serge E. Hallyn
     [not found]           ` <a6ef5679-6aef-21de-7cdb-48e8af83f874-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-08 23:31             ` Serge E. Hallyn
     [not found] ` <20170720225033.21298-1-mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-20 22:50   ` Mehmet Kayaalp
2017-07-20 22:50   ` [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data Mehmet Kayaalp
2017-07-20 22:50   ` [RFC PATCH 3/5] ima: mamespace audit status flags Mehmet Kayaalp
2017-07-20 22:50   ` [RFC PATCH 4/5] ima: differentiate auditing policy rules from "audit" actions Mehmet Kayaalp
2017-07-20 22:50     ` Mehmet Kayaalp
2017-07-20 22:50     ` 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
2017-07-20 22:50 ` [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data Mehmet Kayaalp
2017-07-20 22:50   ` Mehmet Kayaalp
     [not found]   ` <20170720225033.21298-3-mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 19:43     ` Serge E. Hallyn
2017-07-25 19:43       ` Serge E. Hallyn
2017-07-25 19:43       ` Serge E. Hallyn
     [not found]       ` <20170725194315.GA2397-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2017-07-25 20:15         ` Mimi Zohar
2017-07-25 20:15           ` Mimi Zohar
2017-07-25 20:15           ` Mimi Zohar
     [not found]           ` <1501013725.27413.27.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-07-25 20:25             ` Stefan Berger
2017-07-25 20:25               ` Stefan Berger
2017-07-25 20:25               ` Stefan Berger
2017-07-25 20:49             ` Serge E. Hallyn
2017-07-25 20:49               ` Serge E. Hallyn
2017-07-25 20:49               ` Serge E. Hallyn
2017-08-11 15:00     ` Stefan Berger
2017-08-11 15:00   ` Stefan Berger
2017-08-11 15:00     ` Stefan Berger
2017-07-20 22:50 ` [RFC PATCH 3/5] ima: mamespace audit status flags Mehmet Kayaalp
2017-07-20 22:50   ` Mehmet Kayaalp
     [not found]   ` <20170720225033.21298-4-mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-08-01 17:17     ` Tycho Andersen via Containers
2017-08-01 17:17   ` Tycho Andersen
2017-08-01 17:17     ` Tycho Andersen
2017-08-01 17:25     ` Mehmet Kayaalp
2017-08-01 17:25       ` Mehmet Kayaalp
2017-08-02 21:48       ` Tycho Andersen
2017-08-02 21:48         ` Tycho Andersen
2017-08-01 17:25     ` 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
2017-07-20 22:50   ` Mehmet Kayaalp

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.