LSM: Module stacking for AppArmor
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest47 of 59 patches 0 repliesNew
47 of 59 patches are in this archive. The cover letter announces 59.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/59 | LSM: Infrastructure management of the superblockinclude/ security/ security/ +4 more | +85 | 0 replies | |
| 2/59 | LSM: Infrastructure management of the sock securityinclude/ security/ security/ +7 more | +144 | 0 replies | |
| 3/59 | LSM: Infrastructure management of the key security blobinclude/ security/ security/ +3 more | +75 | 0 replies | |
| 4/59 | LSM: Create an lsm_export data structure.include/ | +12 | 0 replies | |
| 5/59 | LSM: Use lsm_export in the inode_getsecid hooksinclude/ include/ security/ +2 more | +68 | 0 replies | |
| 6/59 | LSM: Use lsm_export in the cred_getsecid hooksinclude/ security/ security/ +1 more | +11 | 0 replies | |
| 7/59 | LSM: Use lsm_export in the ipc_getsecid and task_getsecid hooksinclude/ security/ security/ +2 more | +32 | 0 replies | |
| 8/59 | LSM: Use lsm_export in the kernel_ask_as hooksinclude/ security/ security/ +1 more | +41 | 0 replies | |
| 9/59 | LSM: Use lsm_export in the getpeersec_dgram hooksinclude/ security/ security/ +2 more | +23 | 0 replies | |
| 10/59 | LSM: Use lsm_export in the audit_rule_match hooksinclude/ security/ security/ +8 more | +58 | 0 replies | |
| 11/59 | LSM: Fix logical operation in lsm_export checkssecurity/ security/ | +2 | 0 replies | |
| 12/59 | LSM: Use lsm_export in the secid_to_secctx hooksinclude/ security/ security/ +3 more | +22 | 0 replies | |
| 13/59 | LSM: Use lsm_export in the secctx_to_secid hooksinclude/ security/ security/ +3 more | +30 | 0 replies | |
| 14/59 | LSM: Use lsm_export in security_audit_rule_matchinclude/ kernel/ kernel/ +2 more | +63 | 0 replies | |
| 15/59 | LSM: Use lsm_export in security_kernel_act_asinclude/ include/ kernel/ +1 more | +13 | 0 replies | |
| 16/59 | LSM: Use lsm_export in security_socket_getpeersec_dgraminclude/ include/ net/ +1 more | +15 | 0 replies | |
| 17/59 | LSM: Use lsm_export in security_secctx_to_secidinclude/ kernel/ net/ +3 more | +20 | 0 replies | |
| 18/59 | LSM: Use lsm_export in security_secid_to_secctxdrivers/ include/ include/ +10 more | +69 | 0 replies | |
| 19/59 | LSM: Use lsm_export in security_ipc_getsecidinclude/ kernel/ security/ | +10 | 0 replies | |
| 20/59 | LSM: Use lsm_export in security_task_getseciddrivers/ include/ kernel/ +7 more | +44 | 0 replies | |
| 21/59 | LSM: Use lsm_export in security_inode_getsecidinclude/ kernel/ security/ +1 more | +12 | 0 replies | |
| 22/59 | LSM: Use lsm_export in security_cred_getsecidinclude/ security/ security/ | +6 | 0 replies | |
| 23/59 | Audit: Change audit_sig_sid to audit_sig_lsminclude/ kernel/ kernel/ +1 more | +17 | 0 replies | |
| 24/59 | Audit: Convert target_sid to an lsm_export structurekernel/ kernel/ | +14 | 0 replies | |
| 25/59 | Audit: Convert osid to an lsm_export structurekernel/ kernel/ kernel/ | +15 | 0 replies | |
| 26/59 | IMA: Clean out lsm_export scaffoldingsecurity/ security/ security/ +2 more | +27 | 0 replies | |
| 27/59 | NET: Store LSM access information in the socket blob for UDSinclude/ net/ security/ | +43 | 0 replies | |
| 28/59 | NET: Remove scaffolding on secmarksnet/ | +7 | 0 replies | |
| 29/59 | NET: Remove scaffolding on new secmarksnet/ | +7 | 0 replies | |
| 30/59 | NET: Remove netfilter scaffolding for lsm_exportnet/ net/ net/ | +21 | 0 replies | |
| 31/59 | Netlabel: Replace secids with lsm_exportinclude/ net/ net/ +8 more | +64 | 0 replies | |
| 32/59 | LSM: Remove lsm_export scaffolding functionsinclude/ | +0 | 0 replies | |
| 33/59 | IMA: FIXUP prototype using lsm_exportsecurity/ | +2 | 0 replies | |
| 34/59 | Smack: Restore the release_secctx hooksecurity/ | +5 | 0 replies | |
| 35/59 | AppArmor: Remove unnecessary hook stubsecurity/ | +2 | 0 replies | |
| 36/59 | LSM: Limit calls to certain module hookssecurity/ | +28 | 0 replies | |
| 37/59 | LSM: Create a data structure for a security contextinclude/ | +11 | 0 replies | |
| 38/59 | LSM: Use lsm_context in secid_to_secctx hooksinclude/ security/ security/ +3 more | +23 | 0 replies | |
| 39/59 | LSM: Use lsm_context in secctx_to_secid hooksinclude/ security/ security/ +3 more | +15 | 0 replies | |
| 40/59 | LSM: Use lsm_context in inode_getsecctx hooksinclude/ security/ security/ +1 more | +17 | 0 replies | |
| 41/59 | LSM: Use lsm_context in inode_notifysecctx hooksinclude/ security/ security/ +1 more | +13 | 0 replies | |
| 42/59 | LSM: Use lsm_context in dentry_init_security hooksinclude/ security/ security/ | +15 | 0 replies | |
| 43/59 | LSM: Use lsm_context in security_dentry_init_securityfs/ include/ security/ | +11 | 0 replies | |
| 44/59 | LSM: Use lsm_context in security_inode_notifysecctxfs/ fs/ include/ +1 more | +13 | 0 replies | |
| 45/59 | LSM: Use lsm_context in security_inode_getsecctxfs/ fs/ include/ +1 more | +16 | 0 replies | |
| 46/59 | LSM: Use lsm_context in security_secctx_to_secidinclude/ kernel/ net/ +3 more | +24 | 0 replies | |
| 47/59 | LSM: Use lsm_context in release_secctx hooksinclude/ security/ security/ +3 more | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/59] LSM: Module stacking for AppArmor
This patchset provides the changes required for the AppArmor security module to stack safely with "exclusive" security modules, those being SELinux and Smack.
Performance: Using a kernel compile benchmark indicates a performance impact of 0.15% for a Fedora 29 system with SELinux. Adding AppArmor has an additional 0.20% impact. Fedora does not include an AppArmor profile.
A new process attribute identifies which security module information should be reported by SO_PEERSEC and the /proc/.../attr/current interface. This is provided by /proc/.../attr/display. Writing the name of the security module desired to this interface will set which LSM hooks will be called for this information. The first security module providing the hooks will be used by default.
The use of integer based security tokens (secids) is generally (but not completely) replaced by a structure lsm_export. The lsm_export structure can contain information for each of the security modules that export information outside the LSM layer.
The LSM interfaces that provide "secctx" text strings have been changed to use a structure "lsm_context" instead of a pointer/length pair. In some cases the interfaces used a "char *" pointer and in others a "void *". This was necessary to ensure that the correct release mechanism for the text is used. It also makes many of the interfaces cleaner.
The security module stacking issues around netlabel not addressed here as they are beyond what is required to stack AppArmor with either SELinux or Smack.
git://github.com/cschaufler/lsm-stacking.git#stack-5.1-rc2-apparmor
--- drivers/android/binder.c | 25 ++- fs/kernfs/dir.c | 6 +- fs/kernfs/inode.c | 31 ++- fs/kernfs/kernfs-internal.h | 3 +- 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 | 93 ++++---- include/linux/nfs4.h | 8 +- include/linux/security.h | 137 ++++++++---- include/net/netlabel.h | 10 +- include/net/scm.h | 14 +- kernel/audit.c | 43 ++-- kernel/audit.h | 9 +- kernel/auditfilter.c | 6 +- kernel/auditsc.c | 77 ++++--- kernel/cred.c | 15 +- net/ipv4/cipso_ipv4.c | 13 +- net/ipv4/ip_sockglue.c | 12 +- net/netfilter/nf_conntrack_netlink.c | 29 ++- net/netfilter/nf_conntrack_standalone.c | 16 +- net/netfilter/nfnetlink_queue.c | 38 ++-- net/netfilter/nft_meta.c | 13 +- net/netfilter/xt_SECMARK.c | 14 +- net/netlabel/netlabel_kapi.c | 5 +- net/netlabel/netlabel_unlabeled.c | 101 +++++---- net/netlabel/netlabel_unlabeled.h | 2 +- net/netlabel/netlabel_user.c | 13 +- net/netlabel/netlabel_user.h | 2 +- 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 | 366 ++++++++++++++++++++++++++++---- security/selinux/hooks.c | 259 +++++++++++----------- security/selinux/include/audit.h | 5 +- security/selinux/include/objsec.h | 42 +++- security/selinux/netlabel.c | 25 +-- security/selinux/ss/services.c | 18 +- security/smack/smack.h | 18 ++ security/smack/smack_lsm.c | 238 +++++++++++---------- security/smack/smack_netfilter.c | 8 +- security/smack/smackfs.c | 12 +- 57 files changed, 1252 insertions(+), 781 deletions(-)