]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: Fix regression in profile conflict logic
authorMatthew Garrett <mjg59@google.com>
Thu, 11 Jan 2018 21:07:54 +0000 (13:07 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 12 Jan 2018 23:56:50 +0000 (15:56 -0800)
commita63a6f5a9ecc688f7b9462d9034c7c72dcae4dfb
tree8d7c0129e2feae1259325aa7ff33ccb821d93aa2
parent4c84547c1b430529de74de3c6f0c48c4ff474022
apparmor: Fix regression in profile conflict logic

The intended behaviour in apparmor profile matching is to flag a
conflict if two profiles match equally well. However, right now a
conflict is generated if another profile has the same match length even
if that profile doesn't actually match. Fix the logic so we only
generate a conflict if the profiles match.

Fixes: 1f6ca5720a2f ("apparmor: ensure that undecidable profile attachments fail")
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Matthew Garrett <mjg59@google.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/domain.c