* [PATCH] apparmor: Use pointer to struct aa_label for lbs_cred
@ 2022-10-20 2:36 Xiu Jianfeng
2022-10-20 13:01 ` Casey Schaufler
0 siblings, 1 reply; 2+ messages in thread
From: Xiu Jianfeng @ 2022-10-20 2:36 UTC (permalink / raw)
To: john.johansen, paul, jmorris, serge, keescook, casey
Cc: apparmor, linux-security-module, linux-kernel
According to the implementations of cred_label and set_cred_label, we
should use pointer to struct aa_label for lbs_cred instead of struct
aa_task_ctx, this patch fix it.
Fixes: bbd3662a8348 ("Infrastructure management of the cred security blob")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
security/apparmor/lsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index f56070270c69..fd2f57972a17 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1197,7 +1197,7 @@ static int apparmor_inet_conn_request(const struct sock *sk, struct sk_buff *skb
* The cred blob is a pointer to, not an instance of, an aa_task_ctx.
*/
struct lsm_blob_sizes apparmor_blob_sizes __lsm_ro_after_init = {
- .lbs_cred = sizeof(struct aa_task_ctx *),
+ .lbs_cred = sizeof(struct aa_label *),
.lbs_file = sizeof(struct aa_file_ctx),
.lbs_task = sizeof(struct aa_task_ctx),
};
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] apparmor: Use pointer to struct aa_label for lbs_cred
2022-10-20 2:36 [PATCH] apparmor: Use pointer to struct aa_label for lbs_cred Xiu Jianfeng
@ 2022-10-20 13:01 ` Casey Schaufler
0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2022-10-20 13:01 UTC (permalink / raw)
To: Xiu Jianfeng, john.johansen, paul, jmorris, serge, keescook
Cc: apparmor, linux-security-module, linux-kernel, casey
On 10/19/2022 7:36 PM, Xiu Jianfeng wrote:
> According to the implementations of cred_label and set_cred_label, we
> should use pointer to struct aa_label for lbs_cred instead of struct
> aa_task_ctx, this patch fix it.
>
> Fixes: bbd3662a8348 ("Infrastructure management of the cred security blob")
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> ---
> security/apparmor/lsm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index f56070270c69..fd2f57972a17 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1197,7 +1197,7 @@ static int apparmor_inet_conn_request(const struct sock *sk, struct sk_buff *skb
> * The cred blob is a pointer to, not an instance of, an aa_task_ctx.
If your premise is true you'll want to fix this comment as well as the code.
> */
> struct lsm_blob_sizes apparmor_blob_sizes __lsm_ro_after_init = {
> - .lbs_cred = sizeof(struct aa_task_ctx *),
> + .lbs_cred = sizeof(struct aa_label *),
> .lbs_file = sizeof(struct aa_file_ctx),
> .lbs_task = sizeof(struct aa_task_ctx),
> };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-20 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 2:36 [PATCH] apparmor: Use pointer to struct aa_label for lbs_cred Xiu Jianfeng
2022-10-20 13:01 ` Casey Schaufler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).