]> git.karo-electronics.de Git - karo-tx-linux.git/commit
AppArmor: Fix masking of capabilities in complain mode
authorJohn Johansen <john.johansen@canonical.com>
Sat, 25 Jun 2011 15:57:07 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Aug 2011 04:58:42 +0000 (21:58 -0700)
commit06b943855b6dbcc8cb3cdca954c19711ce7b76b6
treeae04be0c7f6a25212609181bc478347297b85b4c
parent0635a74b4ab037ed0c6d628d9cc737b949a15731
AppArmor: Fix masking of capabilities in complain mode

commit 25e75dff519bcce2cb35023105e7df51d7b9e691 upstream.

AppArmor is masking the capabilities returned by capget against the
capabilities mask in the profile.  This is wrong, in complain mode the
profile has effectively all capabilities, as the profile restrictions are
not being enforced, merely tested against to determine if an access is
known by the profile.

This can result in the wrong behavior of security conscience applications
like sshd which examine their capability set, and change their behavior
accordingly.  In this case because of the masked capability set being
returned sshd fails due to DAC checks, even when the profile is in complain
mode.

Kernels affected: 2.6.36 - 3.0.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/apparmor/lsm.c