From: Paul Moore <pmoore@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH 2/2] audit: log binding and unbinding to netlink multicast socket
Date: Fri, 24 Jul 2015 18:58:42 -0400 [thread overview]
Message-ID: <3104753.orA6D5XYvi@sifl> (raw)
In-Reply-To: <8611875.W95Jo5o7mj@x2>
On Thursday, July 23, 2015 04:45:19 PM Steve Grubb wrote:
> Log information about programs connecting and disconnecting to the audit
> netlink multicast socket. This is needed so that during investigations a
> security officer can tell who or what had access to the audit trail. This
> helps to meet the FAU_SAR.2 requirement for Common Criteria.
>
> Signed-off-by: Steve Grubb <sgrubb@redhat.com>
> ---
> include/uapi/linux/audit.h | 1 +
> kernel/audit.c | 30 ++++++++++++++++++++++++++++--
> 2 files changed, 29 insertions(+), 2 deletions(-)
...
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 29fb38b..3253f1b 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -1135,13 +1135,36 @@ void audit_log_task_simple(struct audit_buffer *ab,
> struct task_struct *tsk) }
> EXPORT_SYMBOL(audit_log_task_simple);
>
> +static void audit_log_bind(int group, const char *op, int err)
> +{
Hmmm, how about a name tweak to indicate multicast? How about
audit_log_multicast_bind()?
> + struct audit_buffer *ab;
> +
> + ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_EVENT_LISTENER);
> + if (!ab)
> + return;
> +
> + audit_log_task_simple(ab, current);
> + audit_log_format(ab, " nlnk-grp=%d", group);
> + audit_log_format(ab, " op=%s", op);
> + audit_log_format(ab, " res=%d", !err);
> + audit_log_end(ab);
Any reason we can't do this with one audit_log_format() call?
audit_log_format(ab, "nlnk-grp=%d op=%s res=%d", group, op, !err);
--
paul moore
security @ redhat
prev parent reply other threads:[~2015-07-24 22:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 20:45 [PATCH 2/2] audit: log binding and unbinding to netlink multicast socket Steve Grubb
2015-07-24 22:58 ` Paul Moore [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3104753.orA6D5XYvi@sifl \
--to=pmoore@redhat.com \
--cc=linux-audit@redhat.com \
--cc=sgrubb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox