All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [ARCHIVE DEBUG 06/13] audit_debug: don't let systemd change config
Date: Thu, 22 Oct 2015 15:18:19 -0400	[thread overview]
Message-ID: <2054929.FHXHZSGzHO@x2> (raw)
In-Reply-To: <9307bb8cd95c66773be32c2bff4d1be3efd94d10.1445536765.git.rgb@redhat.com>

On Thursday, October 22, 2015 02:58:52 PM Richard Guy Briggs wrote:
> Debug the possibility of systemd changing the audit config causing
> shutdown delays by blocking all such requests.

I don't understand what you are saying here. As long as something something 
has CAP_AUDIT_CONTROL, it can make changes. But we have to record what made 
the changes in the logs.

-Steve

> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
>  kernel/audit.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 30b3b08..93a466b 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -680,18 +680,20 @@ static int audit_netlink_ok(struct sk_buff *skb, u16
> msg_type) case AUDIT_ADD:
>  	case AUDIT_DEL:
>  		return -EOPNOTSUPP;
> -	case AUDIT_GET:
>  	case AUDIT_SET:
> -	case AUDIT_GET_FEATURE:
>  	case AUDIT_SET_FEATURE:
> -	case AUDIT_LIST_RULES:
>  	case AUDIT_ADD_RULE:
>  	case AUDIT_DEL_RULE:
> -	case AUDIT_SIGNAL_INFO:
> -	case AUDIT_TTY_GET:
> -	case AUDIT_TTY_SET:
>  	case AUDIT_TRIM:
>  	case AUDIT_MAKE_EQUIV:
> +	case AUDIT_TTY_SET:
> +		if (current->tgid == 1)
> +			return -EPERM;
> +	case AUDIT_GET:
> +	case AUDIT_GET_FEATURE:
> +	case AUDIT_LIST_RULES:
> +	case AUDIT_SIGNAL_INFO:
> +	case AUDIT_TTY_GET:
>  		/* Only support auditd and auditctl in initial pid namespace
>  		 * for now. */
>  		if ((task_active_pid_ns(current) != &init_pid_ns))

  reply	other threads:[~2015-10-22 19:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 18:58 [ARCHIVE DEBUG 00/13] audit_debug: diagnostics for audit internal workings Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 01/13] audit_debug: set reserve to same size as backlog Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 02/13] audit_debug: squawk when digging into reserve Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 03/13] audit_debug: proc instrumentation Richard Guy Briggs
2015-10-22 19:23   ` Steve Grubb
2015-10-22 19:47     ` Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 04/13] audit_debug: add /proc counters for overflows, waiters, recovers, reserves Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 05/13] audit_debug: proc debug output easier to paste Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 06/13] audit_debug: don't let systemd change config Richard Guy Briggs
2015-10-22 19:18   ` Steve Grubb [this message]
2015-10-22 19:28     ` Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 07/13] audit_debug: instrument audit_cmd_mutex contention Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 08/13] audit_debug: seperate out audit_titles in proc display Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 09/13] netlink_debug: instrument timing of calls by init/systemd or audit_pid Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 10/13] audit_debug: bark on impossible reserve process conditions in while loop Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 11/13] audit_debug: instrument audit_receive timing Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 12/13] audit_debug: list processes and frequencies waiting for auditd Richard Guy Briggs
2015-10-22 18:58 ` [ARCHIVE DEBUG 13/13] audit_debug: print inode nr for each path when listing exe rules Richard Guy Briggs

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=2054929.FHXHZSGzHO@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=rgb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.