summaryrefslogtreecommitdiff
path: root/security/apparmor
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2016-03-17 22:02:54 +0300
committerJohn Johansen <john.johansen@canonical.com>2016-07-12 18:43:10 +0300
commit23ca7b640b4a55f8747301b6bd984dd05545f6a7 (patch)
treef089a9cb4019cee951b6a6e2d5004013ed43e47a /security/apparmor
parentf7da2de01127b58d93cebeab165136d0998e7b1a (diff)
downloadlinux-23ca7b640b4a55f8747301b6bd984dd05545f6a7.tar.xz
apparmor: check that xindex is in trans_table bounds
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/policy_unpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index a55fb2f170c9..951ae4633979 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -676,7 +676,7 @@ static bool verify_xindex(int xindex, int table_size)
int index, xtype;
xtype = xindex & AA_X_TYPE_MASK;
index = xindex & AA_X_INDEX_MASK;
- if (xtype == AA_X_TABLE && index > table_size)
+ if (xtype == AA_X_TABLE && index >= table_size)
return 0;
return 1;
}