Skip to content

AppArmor security module overview

[email protected] lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest47 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/47Pass struct vfsmount to the inode_create LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+13 -80 replies
2/47Pass struct path down to remove_suid and childrenfs/ntfs/file.c fs/reiser4/plugin/file/cryptcompress.c fs/reiser4/plugin/file/file.c +5 more+17 -170 replies
3/47Add a vfsmount parameter to notify_change()fs/attr.c fs/ecryptfs/inode.c fs/exec.c +16 more+85 -590 replies
4/47Pass struct vfsmount to the inode_setattr LSM hookfs/attr.c include/linux/security.h security/dummy.c +2 more+16 -90 replies
5/47Add struct vfsmount parameter to vfs_mkdir()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/nfs4recover.c +6 more+24 -110 replies
6/47Pass struct vfsmount to the inode_mkdir LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+13 -70 replies
7/47Add a struct vfsmount parameter to vfs_mknod()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/vfs.c +6 more+20 -100 replies
8/47Pass struct vfsmount to the inode_mknod LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+13 -80 replies
9/47Add a struct vfsmount parameter to vfs_symlink()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/vfs.c +5 more+24 -100 replies
10/47Pass struct vfsmount to the inode_symlink LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+11 -80 replies
11/47Pass struct vfsmount to the inode_readlink LSM hookfs/stat.c include/linux/security.h security/dummy.c +2 more+11 -80 replies
12/47Add struct vfsmount parameters to vfs_link()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/vfs.c +2 more+24 -90 replies
13/47Pass the struct vfsmounts to the inode_link LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+29 -130 replies
14/47Add a struct vfsmount parameter to vfs_rmdir()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/nfs4recover.c +4 more+17 -100 replies
15/47Pass struct vfsmount to the inode_rmdir LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+15 -80 replies
16/47Call lsm hook before unhashing dentry in vfs_rmdir()fs/namei.c+7 -60 replies
17/47Add a struct vfsmount parameter to vfs_unlink()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/nfs4recover.c +11 more+46 -200 replies
18/47Pass struct vfsmount to the inode_unlink LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+16 -90 replies
19/47Add struct vfsmount parameters to vfs_rename()fs/ecryptfs/inode.c fs/namei.c fs/nfsd/vfs.c +2 more+26 -110 replies
20/47Pass struct vfsmount to the inode_rename LSM hookfs/namei.c include/linux/security.h security/dummy.c +2 more+27 -110 replies
21/47Add a struct vfsmount parameter to vfs_setxattr()fs/nfsd/vfs.c fs/unionfs/copyup.c fs/unionfs/xattr.c +2 more+38 -220 replies
22/47Pass struct vfsmount to the inode_setxattr LSM hookfs/xattr.c include/linux/security.h security/commoncap.c +3 more+45 -290 replies
23/47Add a struct vfsmount parameter to vfs_getxattr()fs/nfsd/nfs4xdr.c fs/nfsd/vfs.c fs/unionfs/copyup.c +4 more+28 -200 replies
24/47Pass struct vfsmount to the inode_getxattr LSM hookfs/xattr.c include/linux/security.h security/dummy.c +2 more+15 -90 replies
25/47Add a struct vfsmount parameter to vfs_listxattr()fs/unionfs/copyup.c fs/unionfs/xattr.c fs/xattr.c +1 more+21 -150 replies
26/47Pass struct vfsmount to the inode_listxattr LSM hookfs/xattr.c include/linux/security.h security/dummy.c +2 more+10 -90 replies
27/47Add a struct vfsmount parameter to vfs_removexattr()fs/nfsd/vfs.c fs/unionfs/xattr.c fs/xattr.c +1 more+14 -110 replies
28/47Pass struct vfsmount to the inode_removexattr LSM hookfs/xattr.c include/linux/security.h security/commoncap.c +3 more+18 -110 replies
29/47Fix __d_path() for lazy unmounts and make it unambiguousfs/dcache.c+96 -700 replies
30/47Make d_path() consistent across mount operationsfs/dcache.c+8 -60 replies
31/47Add d_namespace_path() to compute namespace relative pathnamesfs/dcache.c fs/namespace.c include/linux/dcache.h +1 more+32 -20 replies
32/47From: Miklos Szeredi <[email protected]>fs/fuse/file.c fs/stat.c include/linux/fs.h+42 -10 replies
33/47VFS: new fsetattr() file operationfs/afs/dir.c fs/afs/file.c fs/afs/inode.c +14 more+114 -480 replies
34/47Pass struct file down the inode_*xattr security LSM hooksfs/nfsd/vfs.c fs/unionfs/copyup.c fs/unionfs/xattr.c +7 more+107 -810 replies
35/47Factor out sysctl pathname codeinclude/linux/sysctl.h kernel/sysctl.c security/selinux/hooks.c+34 -300 replies
36/47Allow permission functions to tell between parent and leaf checksfs/namei.c+2 -00 replies
37/47Switch to vfs_permission() in do_path_lookup()fs/namei.c+3 -60 replies
38/47Switch to vfs_permission() in sys_fchdir()fs/open.c+6 -50 replies
39/47Fix file_permission()fs/namei.c+7 -10 replies
40/47Export audit subsystem for use by modulesinclude/linux/audit.h kernel/audit.c+15 -30 replies
41/47AppArmor: Main Partsecurity/apparmor/main.c+1357 -00 replies
42/47AppArmor: Module and LSM hookssecurity/apparmor/lsm.c+815 -00 replies
43/47AppArmor: Profile loading and manipulation, pathname matchingsecurity/apparmor/match.c security/apparmor/match.h security/apparmor/module_interface.c+1189 -00 replies
44/47AppArmor: all the restsecurity/apparmor/Kconfig security/apparmor/Makefile security/apparmor/apparmor.h +5 more+1255 -00 replies
45/47Add AppArmor LSM to security/Makefilesecurity/Kconfig security/Makefile security/apparmor/Kconfig+22 -20 replies
46/47add simple network toggles to apparmorsecurity/apparmor/Makefile security/apparmor/apparmor.h security/apparmor/lsm.c +2 more+255 -40 replies
47/47--- Documentation/lsm/AppArmor-Security-Goal.txt | 134 +++++++++++++++++++++++++++ 1 file changed, 134 insertions(+)Documentation/lsm/AppArmor-Security-Goal.txt+134 -00 replies

Reviews trailers per patch

2 of 47 patches have a Reviewed-by or Acked-by.

PatchAlan CoxJames Morris
1/47
2/47
3/47
4/47
5/47
6/47
7/47
8/47
9/47
10/47
11/47
12/47
13/47
14/47
15/47
16/47
17/47
18/47
19/47
20/47
21/47
22/47
23/47
24/47
25/47
26/47
27/47
28/47
29/47A-b
30/47
31/47
32/47
33/47
34/47
35/47R-b
36/47
37/47
38/47
39/47
40/47
41/47
42/47
43/47
44/47
45/47
46/47
47/47

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [AppArmor 00/47] AppArmor security module overview
Signature · 88 lines
This submission of the AppArmor security module is based against 2.6.24-rc4-mm.

Any comments and feedback to improve implementation are appreciated.

Changes since previous submission
- added apparmor security goal document.
  Documentation/lsm/AppArmor-Security-Goal.txt
- removed DAC style permissions in favor of a simpler file owner
  permissions specification
- include the fgetattr and fsetattr patches by Miklos Szeredi
  <[email protected]>, and update them to use ATTR_FILE to enable LSMs to
  distinguish file descriptor operations
- fix error where a NULL sock passed to socket_getsocket_getpeersec_dgram()
  was not correctly handled.
- fix error in link permission subset test

Outstanding Issues
- use of d_namespace_path and buffer allocation to obtain a pathname for
  mediation.
- conditional passing of the vfsmnt.  This can be addressed by rebasing
  on the lookup intent patches but that has not been done for this
  submission.
- ipc and signal mediation are a wip and not included.
- fine grained network mediation
- system confinement from boot is a wip and not included.
- documentation needs to be updated to include newest features


The patch series consists of five areas:

 (1) Pass struct vfsmount through to LSM hooks.

 (2) Fixes and improvements to __d_path():

     (a) make it unambiguous and exclude unreachable paths from
         /proc/mounts,

     (b) make its result consistent in the face of remounts,

     (c) introduce d_namespace_path(), a variant of d_path that goes up
         to the namespace root instead of the chroot.

     (d) the behavior of d_path() and getcwd() remain unchanged, and
     there is no hidding of unreachable paths in /proc/mounts.  The
     patches addressing these have been seperated from the AppArmor
     submission and will be introduced at a later date.
 
     Part (a) has been in the -mm tree for a while; this series includes
     an updated copy of the -mm patch. Parts (b) and (c) shouldn't be too
     controversial.

 (3) Be able to distinguish file descriptor access from access by name
     in LSM hooks.

     Applications expect different behavior from file descriptor
     accesses and accesses by name in some cases. We need to pass this
     information down the LSM hooks to allow AppArmor to tell which is
     which.

 (4) Convert the selinux sysctl pathname computation code into a standalone
     function.

 (5) The AppArmor LSM itself.

     (See below.)

A tarball of the kernel patches, base user-space utilities, example
profiles, and technical documentation (including a walk-through) are
available at:

  http://forgeftp.novell.com/apparmor/LKML_Submission-Dec-07/

Only the most recent features are covered in brief here for a more
complete explaination please refere to the technical documentation.


File ownership permissions
  The DAC style permissions mask allowing the specification of permission
  for each of user, group, and other have been removed, after further feed
  back and discussion, in favor of a simpler permission set that allows
  specifying permissions for file ownership as determined by fsuid.

  Traditional AppArmor rules map to specifying permissions for files
  all files, to reduce the permissions grant the owner keyword can
  be added to a rule.

  /foo rw,		# allow access to file /foo
  owner /foo rw,	# allow access to file /foo only if its uid == fsuid