From: John Johansen Date: Thu, 17 Mar 2016 19:02:54 +0000 (-0700) Subject: apparmor: check that xindex is in trans_table bounds X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=67bf3d7a908ecb1060f6368dd8bc30a85e004790;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git apparmor: check that xindex is in trans_table bounds commit 23ca7b640b4a55f8747301b6bd984dd05545f6a7 upstream. Signed-off-by: John Johansen Acked-by: Seth Arnold Signed-off-by: Jiri Slaby Signed-off-by: Willy Tarreau --- diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 329b1fd3074..6b221354f0a 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c @@ -652,7 +652,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; }