[apparmor] [PATCH 13/16] apparmor: Fix check that xindex is in trans_table bounds

Seth Arnold seth.arnold at canonical.com
Thu Apr 28 03:30:48 UTC 2016


On Wed, Apr 20, 2016 at 11:52:55PM -0700, John Johansen wrote:
> Signed-off-by: John Johansen <john.johansen at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  security/apparmor/policy_unpack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
> index a55fb2f..951ae46 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;
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160427/5d3e606f/attachment.pgp>


More information about the AppArmor mailing list