Skip to content

Commit

Permalink
apparmor: check that xindex is in trans_table bounds
Browse files Browse the repository at this point in the history
Signed-off-by: John Johansen <[email protected]>
Acked-by: Seth Arnold <[email protected]>
  • Loading branch information
John Johansen committed Jul 12, 2016
1 parent f7da2de commit 23ca7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/apparmor/policy_unpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 23ca7b6

Please sign in to comment.