selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/97] LSM: Complete module stacking
@ 2019-02-28 22:43 Casey Schaufler
  2019-02-28 22:43 ` [PATCH 71/97] LSM: Add secmark refcounting to call_one list Casey Schaufler
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: Casey Schaufler @ 2019-02-28 22:43 UTC (permalink / raw)
  To: jmorris, linux-security-module, selinux
  Cc: keescook, john.johansen, penguin-kernel, paul

This is a preliminary version of the complete stacking
implementation. The patches need to be cleaned up, and
several are not strictly necessary. There is likely to
be work required in the audit sub-system. It does address
all the shared data, including CIPSO headers. It should
handle CALIPSO once Smack supports it. I will be revising
the set after 5.1.

Complete the transition from module based blob management
to infrastructure based blob management. This includes
the socket, superblock and key blobs.

Change the LSM infrastructure from exposing secids to
exposing an opaque "lsm_export" structure that can contain
information for multiple active security modules. Update
all of the security modules to use information from the
lsm_export structure. Update the LSM interfaces that expose
secids for more than one module to use the export structure.
Update all the users of these interfaces.

Change the LSM infrastructure from using a string/size pair
for security "contexts" to a "lsm_context" structure that
can represent information for multiple modules. This contains
information that allows the "context" to be properly freed
regardless of where it is allocated and where it is used.

Add an interface to identify which security module data
should be presented with SO_PEERSEC. /proc/.../attr/display
will set and report the name of the LSM for which the
security_secid_to_secctx() will use to translate to text.
If it is not explicitly set, the first security module that
supplies secid (now lsm_export) interfaces will be used.
To ensure consistency, a set of module hooks dealing with
the secid/context processing is maintained with each process
that explicitly sets it.

Before sending a network packet verify that all interested
security modules agree on the labeling. Fail if the labeling
cannot be reconciled. This requires a new Netlabel interface
to compare proposed labels, and a change to the return values
from the existing netlabel attribute setting functions.

git://github.com/cschaufler/lsm-stacking.git#5.0-rc3-plus-a

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
 fs/kernfs/dir.c                                    |   6 +-
 fs/kernfs/inode.c                                  |  31 +-
 fs/kernfs/kernfs-internal.h                        |   4 +-
 fs/nfs/inode.c                                     |  13 +-
 fs/nfs/internal.h                                  |   8 +-
 fs/nfs/nfs4proc.c                                  |  17 +-
 fs/nfs/nfs4xdr.c                                   |  16 +-
 fs/nfsd/nfs4proc.c                                 |   8 +-
 fs/nfsd/nfs4xdr.c                                  |  14 +-
 fs/nfsd/vfs.c                                      |   7 +-
 fs/proc/base.c                                     |   1 +
 include/linux/cred.h                               |   3 +-
 include/linux/lsm_hooks.h                          | 122 ++--
 include/linux/nfs4.h                               |   8 +-
 include/linux/security.h                           | 165 +++--
 include/net/netlabel.h                             |  18 +-
 include/net/route.h                                |  55 +-
 include/net/scm.h                                  |  14 +-
 include/net/sock.h                                 |  14 +-
 include/uapi/linux/netfilter/xt_CONNMARK.h         |  45 +-
 include/uapi/linux/netfilter/xt_DSCP.h             |  27 +-
 include/uapi/linux/netfilter/xt_MARK.h             |  17 +-
 include/uapi/linux/netfilter/xt_RATEEST.h          |  38 +-
 include/uapi/linux/netfilter/xt_TCPMSS.h           |  13 +-
 include/uapi/linux/netfilter_ipv4/ipt_ECN.h        |  40 +-
 include/uapi/linux/netfilter_ipv4/ipt_TTL.h        |  14 +-
 include/uapi/linux/netfilter_ipv6/ip6t_HL.h        |  14 +-
 kernel/audit.c                                     |  60 +-
 kernel/audit.h                                     |   9 +-
 kernel/auditfilter.c                               |   6 +-
 kernel/auditsc.c                                   |  61 +-
 kernel/cred.c                                      |  15 +-
 net/ipv4/cipso_ipv4.c                              |  13 +-
 net/ipv4/ip_sockglue.c                             |  14 +-
 net/ipv4/route.c                                   |  61 ++
 net/netfilter/nf_conntrack_netlink.c               |  27 +-
 net/netfilter/nf_conntrack_standalone.c            |  16 +-
 net/netfilter/nfnetlink_queue.c                    |  35 +-
 net/netfilter/nft_meta.c                           |   8 +-
 net/netfilter/xt_DSCP.c                            | 149 ++---
 net/netfilter/xt_HL.c                              | 164 ++---
 net/netfilter/xt_RATEEST.c                         | 278 +++------
 net/netfilter/xt_SECMARK.c                         |   9 +-
 net/netfilter/xt_TCPMSS.c                          | 378 +++---------
 net/netlabel/netlabel_kapi.c                       | 125 +++-
 net/netlabel/netlabel_unlabeled.c                  |  99 ++-
 net/netlabel/netlabel_unlabeled.h                  |   2 +-
 net/netlabel/netlabel_user.c                       |  13 +-
 net/netlabel/netlabel_user.h                       |   2 +-
 net/socket.c                                       |  17 +
 net/unix/af_unix.c                                 |  11 +-
 security/apparmor/audit.c                          |   4 +-
 security/apparmor/include/audit.h                  |   2 +-
 security/apparmor/include/net.h                    |   6 +-
 security/apparmor/include/secid.h                  |   9 +-
 security/apparmor/lsm.c                            |  64 +-
 security/apparmor/secid.c                          |  42 +-
 security/integrity/ima/ima.h                       |  14 +-
 security/integrity/ima/ima_api.c                   |   9 +-
 security/integrity/ima/ima_appraise.c              |   6 +-
 security/integrity/ima/ima_main.c                  |  34 +-
 security/integrity/ima/ima_policy.c                |  19 +-
 security/security.c                                | 682 ++++++++++++++++++---
 security/selinux/hooks.c                           | 308 +++++-----
 security/selinux/include/audit.h                   |   6 +-
 security/selinux/include/netlabel.h                |   7 +
 security/selinux/include/objsec.h                  |  43 +-
 security/selinux/netlabel.c                        |  69 ++-
 security/selinux/ss/services.c                     |  19 +-
 security/smack/smack.h                             |  34 +
 security/smack/smack_access.c                      |  14 +-
 security/smack/smack_lsm.c                         | 389 ++++++------
 security/smack/smack_netfilter.c                   |  48 +-
 security/smack/smackfs.c                           |  23 +-
 .../Z6.0+pooncelock+poonceLock+pombonce.litmus     |  12 +-
 75 files changed, 2369 insertions(+), 1798 deletions(-)

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

end of thread, other threads:[~2019-02-28 22:46 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 22:43 [PATCH 00/97] LSM: Complete module stacking Casey Schaufler
2019-02-28 22:43 ` [PATCH 71/97] LSM: Add secmark refcounting to call_one list Casey Schaufler
2019-02-28 22:43 ` [PATCH 72/97] LSM: Add secmark refcounting to call_one list - part 2 Casey Schaufler
2019-02-28 22:43 ` [PATCH 73/97] LSM: refactor security_setprocattr Casey Schaufler
2019-02-28 22:43 ` [PATCH 74/97] Smack: Detect if secmarks can be safely used Casey Schaufler
2019-02-28 22:43 ` [PATCH 75/97] LSM: Support multiple LSMs using inode_init_security Casey Schaufler
2019-02-28 22:43 ` [PATCH 76/97] LSM: Use full security context in security_inode_setsecctx Casey Schaufler
2019-02-28 22:43 ` [PATCH 77/97] LSM: Correct handling of ENOSYS in inode_setxattr Casey Schaufler
2019-02-28 22:43 ` [PATCH 78/97] LSM: Infrastructure security blobs for mount options Casey Schaufler
2019-02-28 22:43 ` [PATCH 79/97] LSM: Fix for security_init_inode_security Casey Schaufler
2019-02-28 22:43 ` [PATCH 80/97] Smack: Advertise the secid to netlabel Casey Schaufler
2019-02-28 22:43 ` [PATCH 81/97] LSM: Change error detection for UDP peer security Casey Schaufler
2019-02-28 22:43 ` [PATCH 82/97] Smack: Fix setting of the CIPSO MLS_CAT flags Casey Schaufler
2019-02-28 22:43 ` [PATCH 83/97] Smack: Set netlabel flags properly on new label import Casey Schaufler
2019-02-28 22:43 ` [PATCH 84/97] Netlabel: Add a secattr comparison API function Casey Schaufler
2019-02-28 22:43 ` [PATCH 85/97] Smack: Let netlabel do the work on the ambient domain Casey Schaufler
2019-02-28 22:43 ` [PATCH 86/97] Smack: Don't set the socket label on each send Casey Schaufler
2019-02-28 22:43 ` [PATCH 87/97] Smack: Let netlabel do the work on connections Casey Schaufler
2019-02-28 22:43 ` [PATCH 88/97] Netlabel: Return the labeling type on socket Casey Schaufler
2019-02-28 22:43 ` [PATCH 89/97] " Casey Schaufler
2019-02-28 22:43 ` [PATCH 90/97] " Casey Schaufler
2019-02-28 22:43 ` [PATCH 91/97] " Casey Schaufler
2019-02-28 22:43 ` [PATCH 92/97] LSM: Remember the NLTYPE of netlabel sockets Casey Schaufler
2019-02-28 22:43 ` [PATCH 93/97] Smack: Use the NLTYPE on output Casey Schaufler
2019-02-28 22:43 ` [PATCH 94/97] LSM: Hook for netlabel reconciliation Casey Schaufler
2019-02-28 22:43 ` [PATCH 95/97] LSM: Avoid network conflicts in SELinux and Smack Casey Schaufler
2019-02-28 22:43 ` [PATCH 96/97] LSM: Apply Netlabel consitancy checks on send and connect Casey Schaufler
2019-02-28 22:43 ` [PATCH 97/97] Smack: Remove the exclusive bit Casey Schaufler

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