LSM: Module stacking for AppArmor
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest58 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/58 | LSM: Infrastructure management of the superblockinclude/ security/ security/ +4 more | +85 | 1 reply | |
| 1/58 | LSM: Infrastructure management of the superblockinclude/ security/ security/ +4 more | +85 | 0 replies | |
| 2/58 | LSM: Infrastructure management of the sock securityinclude/ security/ security/ +7 more | +144 | 1 reply | |
| 2/58 | LSM: Infrastructure management of the sock securityinclude/ security/ security/ +7 more | +144 | 0 replies | |
| 3/58 | LSM: Infrastructure management of the key security blobinclude/ security/ security/ +3 more | +75 | 1 reply | |
| 3/58 | LSM: Infrastructure management of the key security blobinclude/ security/ security/ +3 more | +75 | 0 replies | |
| 4/58 | LSM: Create an lsm_export data structure.include/ | +12 | 2 replies | |
| 4/58 | LSM: Create an lsm_export data structure.include/ | +12 | 0 replies | |
| 5/58 | LSM: Use lsm_export in the inode_getsecid hooksinclude/ include/ security/ +2 more | +68 | 3 replies | |
| 5/58 | LSM: Use lsm_export in the inode_getsecid hooksinclude/ include/ security/ +2 more | +68 | 0 replies | |
| 6/58 | LSM: Use lsm_export in the cred_getsecid hooksinclude/ security/ security/ +1 more | +11 | 0 replies | |
| 6/58 | LSM: Use lsm_export in the cred_getsecid hooksinclude/ security/ security/ +1 more | +11 | 0 replies | |
| 7/58 | LSM: Use lsm_export in the ipc_getsecid and task_getsecid hooksinclude/ security/ security/ +2 more | +32 | 0 replies | |
| 7/58 | LSM: Use lsm_export in the ipc_getsecid and task_getsecid hooksinclude/ security/ security/ +2 more | +32 | 0 replies | |
| 8/58 | LSM: Use lsm_export in the kernel_ask_as hooksinclude/ security/ security/ +1 more | +41 | 0 replies | |
| 8/58 | LSM: Use lsm_export in the kernel_ask_as hooksinclude/ security/ security/ +1 more | +41 | 0 replies | |
| 9/58 | LSM: Use lsm_export in the getpeersec_dgram hooksinclude/ security/ security/ +2 more | +22 | 0 replies | |
| 9/58 | LSM: Use lsm_export in the getpeersec_dgram hooksinclude/ security/ security/ +2 more | +22 | 0 replies | |
| 10/58 | LSM: Use lsm_export in the audit_rule_match hooksinclude/ security/ security/ +8 more | +58 | 0 replies | |
| 10/58 | LSM: Use lsm_export in the audit_rule_match hooksinclude/ security/ security/ +8 more | +58 | 0 replies | |
| 11/58 | LSM: Use lsm_export in the secid_to_secctx hooksinclude/ security/ security/ +3 more | +22 | 0 replies | |
| 11/58 | LSM: Use lsm_export in the secid_to_secctx hooksinclude/ security/ security/ +3 more | +22 | 0 replies | |
| 12/58 | LSM: Use lsm_export in the secctx_to_secid hooksinclude/ security/ security/ +3 more | +30 | 0 replies | |
| 12/58 | LSM: Use lsm_export in the secctx_to_secid hooksinclude/ security/ security/ +3 more | +30 | 0 replies | |
| 13/58 | LSM: Use lsm_export in security_audit_rule_matchinclude/ kernel/ kernel/ +2 more | +63 | 0 replies | |
| 13/58 | LSM: Use lsm_export in security_audit_rule_matchinclude/ kernel/ kernel/ +2 more | +63 | 0 replies | |
| 14/58 | LSM: Use lsm_export in security_kernel_act_asinclude/ include/ kernel/ +1 more | +13 | 0 replies | |
| 14/58 | LSM: Use lsm_export in security_kernel_act_asinclude/ include/ kernel/ +1 more | +13 | 0 replies | |
| 15/58 | LSM: Use lsm_export in security_socket_getpeersec_dgraminclude/ include/ net/ +1 more | +15 | 0 replies | |
| 15/58 | LSM: Use lsm_export in security_socket_getpeersec_dgraminclude/ include/ net/ +1 more | +15 | 0 replies | |
| 16/58 | LSM: Use lsm_export in security_secctx_to_secidinclude/ kernel/ net/ +3 more | +20 | 0 replies | |
| 16/58 | LSM: Use lsm_export in security_secctx_to_secidinclude/ kernel/ net/ +3 more | +20 | 0 replies | |
| 17/58 | LSM: Use lsm_export in security_secid_to_secctxdrivers/ include/ include/ +10 more | +69 | 0 replies | |
| 17/58 | LSM: Use lsm_export in security_secid_to_secctxdrivers/ include/ include/ +10 more | +69 | 0 replies | |
| 18/58 | LSM: Use lsm_export in security_ipc_getsecidinclude/ kernel/ security/ | +10 | 0 replies | |
| 19/58 | LSM: Use lsm_export in security_task_getseciddrivers/ include/ kernel/ +7 more | +44 | 0 replies | |
| 20/58 | LSM: Use lsm_export in security_inode_getsecidinclude/ kernel/ security/ +1 more | +12 | 0 replies | |
| 21/58 | LSM: Use lsm_export in security_cred_getsecidinclude/ security/ security/ | +6 | 0 replies | |
| 22/58 | Audit: Change audit_sig_sid to audit_sig_lsminclude/ kernel/ kernel/ +1 more | +17 | 7 replies | |
| 23/58 | Audit: Convert target_sid to an lsm_export structurekernel/ kernel/ | +14 | 0 replies | |
| 24/58 | Audit: Convert osid to an lsm_export structurekernel/ kernel/ kernel/ | +15 | 0 replies | |
| 25/58 | IMA: Clean out lsm_export scaffoldingsecurity/ security/ security/ +2 more | +27 | 2 replies | |
| 26/58 | NET: Change the UNIXCB from a secid to an lsm_exportinclude/ include/ net/ | +20 | 0 replies | |
| 27/58 | NET: Remove scaffolding on secmarksnet/ | +7 | 0 replies | |
| 28/58 | NET: Remove scaffolding on new secmarksnet/ | +7 | 0 replies | |
| 29/58 | NET: Remove netfilter scaffolding for lsm_exportnet/ net/ net/ | +21 | 0 replies | |
| 30/58 | Netlabel: Replace secids with lsm_exportinclude/ net/ net/ +8 more | +64 | 0 replies | |
| 31/58 | LSM: Remove lsm_export scaffolding functionsinclude/ | +0 | 0 replies | |
| 32/58 | IMA: FIXUP prototype using lsm_exportsecurity/ | +2 | 0 replies | |
| 33/58 | Smack: Restore the release_secctx hooksecurity/ | +5 | 0 replies | |
| 34/58 | AppArmor: Remove unnecessary hook stubsecurity/ | +2 | 0 replies | |
| 35/58 | LSM: Limit calls to certain module hookssecurity/ | +28 | 0 replies | |
| 36/58 | LSM: Create a data structure for a security contextinclude/ | +11 | 0 replies | |
| 37/58 | LSM: Use lsm_context in secid_to_secctx hooksinclude/ security/ security/ +3 more | +23 | 0 replies | |
| 38/58 | LSM: Use lsm_context in secctx_to_secid hooksinclude/ security/ security/ +3 more | +15 | 0 replies | |
| 39/58 | LSM: Use lsm_context in inode_getsecctx hooksinclude/ security/ security/ +1 more | +18 | 0 replies | |
| 40/58 | LSM: Use lsm_context in inode_notifysecctx hooksinclude/ security/ security/ +1 more | +13 | 0 replies | |
| 41/58 | LSM: Use lsm_context in dentry_init_security hooksinclude/ security/ security/ | +15 | 0 replies | |
| 42/58 | LSM: Use lsm_context in security_dentry_init_securityfs/ include/ security/ | +11 | 0 replies | |
| 43/58 | LSM: Use lsm_context in security_inode_notifysecctxfs/ fs/ include/ +1 more | +13 | 0 replies | |
| 44/58 | LSM: Use lsm_context in security_inode_getsecctxfs/ fs/ include/ +1 more | +16 | 0 replies | |
| 45/58 | LSM: Use lsm_context in security_secctx_to_secidinclude/ kernel/ net/ +3 more | +24 | 0 replies | |
| 46/58 | LSM: Use lsm_context in release_secctx hooksinclude/ security/ security/ +3 more | +13 | 2 replies | |
| 47/58 | LSM: Use lsm_context in security_release_secctxdrivers/ fs/ fs/ +13 more | +109 | 0 replies | |
| 48/58 | LSM: Use lsm_context in security_secid_to_secctxdrivers/ include/ include/ +12 more | +37 | 0 replies | |
| 49/58 | fs: remove lsm_context scaffoldingfs/ fs/ fs/ +5 more | +43 | 0 replies | |
| 50/58 | LSM: Add the release function to the lsm_contextinclude/ include/ security/ +4 more | +27 | 0 replies |
Reviews trailers per patch
8 of 67 patches have a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/58] LSM: Module stacking for AppArmor
This patchset provides the changes required for the AppArmor security module to stack safely with any other.
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.
https://github.com/cschaufler/lsm-stacking.git#stack-5.2-v1-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 | 91 +++++---- include/linux/nfs4.h | 8 +- include/linux/security.h | 133 +++++++++---- include/net/af_unix.h | 2 +- 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 | 6 +- 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 | 338 +++++++++++++++++++++++++++----- 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 +- 58 files changed, 1217 insertions(+), 779 deletions(-)