All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] LSM: Security module blob management
@ 2017-06-08 20:43 ` Casey Schaufler
  0 siblings, 0 replies; 28+ messages in thread
From: Casey Schaufler @ 2017-06-08 20:43 UTC (permalink / raw)
  To: LSM, James Morris
  Cc: John Johansen, Tetsuo Handa, Paul Moore, Stephen Smalley,
	Kees Cook, Casey Schaufler, kernel-hardening, LKLM,
	Casey Schaufler

Subject: [PATCH 0/6] LSM: Security module blob management

This patch set moves management of security blobs out of
the Linux security modules and into the security module
infrastructure. This allows "major" security modules that
use blobs to be stacked, just as "minor" modules that
do not use blobs can be stacked today. It stops short of
providing a safe interface for the Netlabel and SO_PEERSEC.
As a result, any of the existing security modules may be
used in combination except for SELinux and Smack.

The result passes the SELinux testsuite for the significant
number of configurations tried, and fails none of them.
Smack tests went swimmingly as well. AppArmor was boot
tested with Ubuntu 17.04.

There is work in a separate project to make Smack a better
user of the Netlabel subsystem, which is needed to allow
for a rational Netlabel configuration when both SELinux
and Smack are active at the same time. That will be the
next phase of the stacking project, and is nearing
completion. I stopped short of including that work here
because it's not required by any of the new security
modules that I know are waiting for "major" stacking.

Patch 1/6: Creates a subdir for Smack in /proc/.../attr.
           This has been submitted as an enhancement for
           Smack, as it cleans up Smack userspace.
Patch 2/6: Introduces infrastructure management of the
           credential (cred->security) blob
Patch 3/6: Introduces infrastructure management of the
           file (file->f_security) blob
Patch 4/6: Introduces infrastructure management of the
           new task (task->security) blob
Patch 5/6: Introduces infrastructure management of the
           remaining security blobs, including the inode,
           socket, superblock and IPC object blobs.
Patch 6/6: Changes the Kconfig in the security subsystem
           to define a module stack instead of a choice
           of a single module. Adds /proc/.../attr
           subdirectories for AppArmor and SELinux. Adds
           a "context" attr file to provide a combined
           view of the process security attributes.

These patches can be found in git at:

	https://github.com/cschaufler/smack-next.git#stacking-4.12-rc2

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
 Documentation/security/LSM.txt      |  33 +-
 fs/proc/base.c                      |  96 +++++-
 fs/proc/internal.h                  |   1 +
 include/linux/lsm_hooks.h           |  26 +-
 include/linux/security.h            |  15 +-
 kernel/cred.c                       |  13 -
 security/Kconfig                    | 105 +++++++
 security/apparmor/context.c         |   2 -
 security/apparmor/include/context.h |  25 +-
 security/apparmor/lsm.c             | 111 ++++---
 security/security.c                 | 587 +++++++++++++++++++++++++++++++++++-
 security/selinux/hooks.c            | 513 +++++++++++--------------------
 security/selinux/include/objsec.h   |  87 +++++-
 security/selinux/netlabel.c         |  15 +-
 security/selinux/selinuxfs.c        |   5 +-
 security/selinux/ss/services.c      |   3 +-
 security/selinux/xfrm.c             |   4 +-
 security/smack/smack.h              |  90 +++++-
 security/smack/smack_access.c       |   2 +-
 security/smack/smack_lsm.c          | 526 +++++++++++---------------------
 security/smack/smack_netfilter.c    |   8 +-
 security/smack/smackfs.c            |  18 +-
 security/tomoyo/common.h            |  30 +-
 security/tomoyo/domain.c            |   4 +-
 security/tomoyo/securityfs_if.c     |  13 +-
 security/tomoyo/tomoyo.c            |  52 +++-
 26 files changed, 1540 insertions(+), 844 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH 0/6] LSM: Infrastructure management of security blobs for stacking
@ 2017-12-19 22:30 Casey Schaufler
  2017-12-19 22:38 ` [PATCH 4/6] LSM: Manage task security blobs Casey Schaufler
  0 siblings, 1 reply; 28+ messages in thread
From: Casey Schaufler @ 2017-12-19 22:30 UTC (permalink / raw)
  To: linux-security-module

Subject: [PATCH 0/6] LSM: Infrastructure management of security blobs for stacking

Move the management of Linux Security Module (LSM) data blobs
out of the individual modules and into the LSM infrastructure.
The modules are now required to declare how much space they need
for each sort of blob used. This will allow modules that use
security blobs to be stacked so long as they aren't using hooks
that require secids. Several proposed modules, including S.A.R.A.,
PTAGS and Landlock, meet these criteria.

A patch set Addressing the secid and netlabel issues associated
with networking will follow, and should have minimal impact on
what is provided here. I am separating the patch sets because I
would like to finalize the blob management. They are different
problems requiring different mindset.

Also available git://github.com/cschaufler/lsm_stacking.git#stacking-4.16

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
 Documentation/admin-guide/LSM/index.rst |  23 +-
 fs/proc/base.c                          |  63 +++-
 fs/proc/internal.h                      |   1 +
 include/linux/lsm_hooks.h               |  26 +-
 include/linux/security.h                |  15 +-
 kernel/cred.c                           |  13 -
 security/Kconfig                        |  97 ++++++
 security/apparmor/context.c             |   2 -
 security/apparmor/include/context.h     |  24 +-
 security/apparmor/include/file.h        |   2 +-
 security/apparmor/lsm.c                 |  71 ++---
 security/security.c                     | 533 ++++++++++++++++++++++++++++++--
 security/selinux/hooks.c                | 490 ++++++++++-------------------
 security/selinux/include/objsec.h       |  87 +++++-
 security/selinux/netlabel.c             |  15 +-
 security/selinux/selinuxfs.c            |   5 +-
 security/selinux/ss/services.c          |   3 +-
 security/selinux/xfrm.c                 |   4 +-
 security/smack/smack.h                  |  90 +++++-
 security/smack/smack_access.c           |   2 +-
 security/smack/smack_lsm.c              | 532 +++++++++++--------------------
 security/smack/smack_netfilter.c        |   8 +-
 security/smack/smackfs.c                |  18 +-
 security/tomoyo/common.h                |  31 +-
 security/tomoyo/domain.c                |   4 +-
 security/tomoyo/securityfs_if.c         |  15 +-
 security/tomoyo/tomoyo.c                |  57 +++-
 27 files changed, 1390 insertions(+), 841 deletions(-)

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

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

end of thread, other threads:[~2017-12-19 22:38 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 20:43 [PATCH 0/6] LSM: Security module blob management Casey Schaufler
2017-06-08 20:43 ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:43 ` Casey Schaufler
2017-06-08 20:49 ` [PATCH 1/6] procfs-add-smack-subdir-to-attrs Casey Schaufler
2017-06-08 20:49   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:49   ` Casey Schaufler
2017-06-08 20:49 ` [PATCH 2/6] LSM-manage-credential-security-blobs Casey Schaufler
2017-06-08 20:49   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:49   ` Casey Schaufler
2017-06-08 20:49 ` [PATCH 3/6] LSM: Manage file security blobs Casey Schaufler
2017-06-08 20:49   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:49   ` Casey Schaufler
2017-06-08 20:49 ` [PATCH 4/6] LSM: manage task " Casey Schaufler
2017-06-08 20:49   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:49   ` Casey Schaufler
2017-06-08 20:50 ` [PATCH 5/6] LSM: Infrastructure management of the remaining blobs Casey Schaufler
2017-06-08 20:50   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:50   ` Casey Schaufler
2017-06-08 20:50 ` [PATCH 6/6] LSM: general but not extreme module stacking Casey Schaufler
2017-06-08 20:50   ` [kernel-hardening] " Casey Schaufler
2017-06-08 20:50   ` Casey Schaufler
2017-06-08 20:58 ` [kernel-hardening] [PATCH 0/6] LSM: Security module blob management Matt Brown
2017-06-08 20:58   ` Matt Brown
2017-06-08 20:58   ` Matt Brown
2017-06-09  3:54   ` James Morris
2017-06-09  3:54     ` James Morris
2017-06-09  3:54     ` James Morris
2017-12-19 22:30 [PATCH 0/6] LSM: Infrastructure management of security blobs for stacking Casey Schaufler
2017-12-19 22:38 ` [PATCH 4/6] LSM: Manage task security blobs Casey Schaufler

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.