linux/security
John Johansen 1bed0c40af apparmor: ensure that undecidable profile attachments fail
commit 844b8292b6 upstream.

Profiles that have an undecidable overlap in their attachments are
being incorrectly handled. Instead of failing to attach the first one
encountered is being used.

eg.
  profile A /** { .. }
  profile B /*foo { .. }

have an unresolvable longest left attachment, they both have an exact
match on / and then have an overlapping expression that has no clear
winner.

Currently the winner will be the profile that is loaded first which
can result in non-deterministic behavior. Instead in this situation
the exec should fail.

Fixes: 898127c34e ("AppArmor: functions for domain transitions")
Signed-off-by: John Johansen <john.johansen@canonical.com>
[bwh: Backported to 3.16:
 - Add 'info' parameter to x_to_profile(), done upstream in commit
   93c98a484c "apparmor: move exec domain mediation to using labels"
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-02-13 18:42:27 +00:00
..
apparmor apparmor: ensure that undecidable profile attachments fail 2018-02-13 18:42:27 +00:00
integrity ima: fix hash algorithm initialization 2018-02-13 18:42:19 +00:00
keys KEYS: add missing permission check for request_key() destination 2018-01-01 20:52:12 +00:00
selinux selinux: fix double free in selinux_parse_opts_str() 2017-09-15 18:30:10 +01:00
smack security: let security modules use PTRACE_MODE_* with bitmasks 2018-01-01 20:52:10 +00:00
tomoyo get rid of pointless checks for NULL ->i_op 2014-04-01 23:19:16 -04:00
yama security: let security modules use PTRACE_MODE_* with bitmasks 2018-01-01 20:52:10 +00:00
capability.c Merge tag 'keys-20140314' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next 2014-04-14 11:42:49 +10:00
commoncap.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2017-09-15 18:30:17 +01:00
device_cgroup.c device_cgroup: use css_has_online_children() instead of has_children() 2014-05-16 13:22:52 -04:00
inode.c sysfs: Create mountpoints with sysfs_create_mount_point 2015-08-20 18:24:03 +01:00
Kconfig KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-09 00:35:20 +00:00
lsm_audit.c audit: anchor all pid references in the initial pid namespace 2014-03-20 10:11:55 -04:00
Makefile security: cleanup Makefiles to use standard syntax for specifying sub-directories 2014-02-17 11:08:04 +11:00
min_addr.c mmap_min_addr check CAP_SYS_RAWIO only for write 2010-04-23 08:56:31 +10:00
security.c vfs: Commit to never having exectuables on proc and sysfs. 2017-04-04 22:21:56 +01:00