lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 21 Dec 2020 11:55:40 -0500 From: Richard Guy Briggs <rgb@...hat.com> To: Linux Containers List <containers@...ts.linux-foundation.org>, Linux API <linux-api@...r.kernel.org>, Linux-Audit Mailing List <linux-audit@...hat.com>, Linux FSdevel <linux-fsdevel@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, Linux NetDev Upstream Mailing List <netdev@...r.kernel.org>, Netfilter Devel List <netfilter-devel@...r.kernel.org> Cc: Neil Horman <nhorman@...driver.com>, David Howells <dhowells@...hat.com>, "Eric W. Biederman" <ebiederm@...ssion.com>, Simo Sorce <simo@...hat.com>, Eric Paris <eparis@...isplace.org>, mpatel@...hat.com, Serge Hallyn <serge@...lyn.com>, Kees Cook <keescook@...omium.org>, Jens Axboe <axboe@...nel.dk>, Christian Brauner <christian.brauner@...ntu.com>, Richard Guy Briggs <rgb@...hat.com> Subject: [PATCH ghak90 v10 06/11] audit: add containerid support for user records Add audit container identifier auxiliary record to user event standalone records. Signed-off-by: Richard Guy Briggs <rgb@...hat.com> Acked-by: Neil Horman <nhorman@...driver.com> Reviewed-by: Ondrej Mosnacek <omosnace@...hat.com> --- kernel/audit.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel/audit.c b/kernel/audit.c index 1c2045c48baf..b23f004f4000 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1338,12 +1338,6 @@ static void audit_log_common_recv_msg(struct audit_context *context, audit_log_task_context(*ab); } -static inline void audit_log_user_recv_msg(struct audit_buffer **ab, - u16 msg_type) -{ - audit_log_common_recv_msg(NULL, ab, msg_type); -} - int is_audit_feature_set(int i) { return af.features & AUDIT_FEATURE_TO_MASK(i); @@ -1619,6 +1613,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) err = audit_filter(msg_type, AUDIT_FILTER_USER); if (err == 1) { /* match or error */ char *str = data; + struct audit_context *context; err = 0; if (msg_type == AUDIT_USER_TTY) { @@ -1626,7 +1621,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (err) break; } - audit_log_user_recv_msg(&ab, msg_type); + context = audit_alloc_local(GFP_KERNEL); + audit_log_common_recv_msg(context, &ab, msg_type); if (msg_type != AUDIT_USER_TTY) { /* ensure NULL termination */ str[data_len - 1] = '\0'; @@ -1640,6 +1636,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) audit_log_n_untrustedstring(ab, str, data_len); } audit_log_end(ab); + audit_log_container_id_ctx(context); + audit_free_context(context); } break; case AUDIT_ADD_RULE: -- 2.18.4
Powered by blists - more mailing lists