]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: fix overlapping attachment computation
authorJohn Johansen <john.johansen@canonical.com>
Sat, 26 Mar 2022 08:58:15 +0000 (01:58 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 19 Jul 2022 09:52:36 +0000 (02:52 -0700)
commitc5f52baadd793f52a85a15212000ee239222d7aa
treefeaa7a3e2737a2bc8d2365c6e235c7755b5eacd6
parentef33aa5bd6119692de3c8011d13e3a67b6788bd7
apparmor: fix overlapping attachment computation

When finding the profile via patterned attachments, the longest left
match is being set to the static compile time value and not using the
runtime computed value.

Fix this by setting the candidate value to the greater of the
precomputed value or runtime computed value.

Fixes: 5569639da4a1 ("apparmor: improve overlapping domain attachment resolution")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/domain.c
security/apparmor/include/policy.h