aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-03-26 01:58:15 -0700
committerJohn Johansen <john.johansen@canonical.com>2022-07-19 02:52:36 -0700
commit2504db207146543736e877241f3b3de005cbe056 (patch)
treefeaa7a3e2737a2bc8d2365c6e235c7755b5eacd6 /security/apparmor/include
parentapparmor: fix setting unconfined mode on a loaded profile (diff)
downloadlinux-dev-2504db207146543736e877241f3b3de005cbe056.tar.xz
linux-dev-2504db207146543736e877241f3b3de005cbe056.zip
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: 21f606610502 ("apparmor: improve overlapping domain attachment resolution") Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r--security/apparmor/include/policy.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index cb5ef21991b7..232d3d9566eb 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -135,7 +135,7 @@ struct aa_profile {
const char *attach;
struct aa_dfa *xmatch;
- int xmatch_len;
+ unsigned int xmatch_len;
enum audit_mode audit;
long mode;
u32 path_flags;