]> git.baikalelectronics.ru Git - kernel.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)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 29 Jun 2011 01:04:44 +0000 (02:04 +0100)
commitc515cecaf0e7a69e91bac6570c2d71385b3b67cb
tree14cb61f6510af1440782fc5f3a81e37aad0c4be5
parent43934f0b3c7b7111e1e4ff532bf0b9b511352f35
AppArmor: Fix masking of capabilities in complain mode

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>
security/apparmor/lsm.c