[PATCH] apparmor: Adjust offset when accessing task blob.

Kees Cook kees at outflux.net
Tue Jan 22 17:41:28 UTC 2019


On Mon, Jan 21, 2019 at 10:25:10AM +0900, Tetsuo Handa wrote:
> AppArmor will no longer be the only user of task blob
> after TOMOYO started using task blob.
> 
> Signed-off-by: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>

I just noticed this today too! You beat me to sending the patch. ;)

Fixes: f4ad8f2c4076 ("LSM: Infrastructure management of the task security")
Acked-by: Kees Cook <keescook at chromium.org>

James, this should get into v5.0 fixes tree.

-Kees

> ---
>  security/apparmor/include/task.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/include/task.h b/security/apparmor/include/task.h
> index 039c1e6..311e652 100644
> --- a/security/apparmor/include/task.h
> +++ b/security/apparmor/include/task.h
> @@ -16,7 +16,7 @@
>  
>  static inline struct aa_task_ctx *task_ctx(struct task_struct *task)
>  {
> -	return task->security;
> +	return task->security + apparmor_blob_sizes.lbs_task;
>  }
>  
>  /*
> -- 
> 1.8.3.1

-- 
Kees Cook                                            @outflux.net



More information about the Linux-security-module-archive mailing list