Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221705

Re: [PATCH V1] audit: add warning that an old auditd may be starved out by a new auditd

From Paul Moore <pmoore@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH V1] audit: add warning that an old auditd may be starved out by a new auditd
Date 2015-09-09 23:00 +0200
Message-ID <q6UDg-5Q3-5@gated-at.bofh.it> (permalink)
References <q67Me-2Kt-15@gated-at.bofh.it> <q67VU-2VX-35@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


On Monday, September 07, 2015 12:58:18 PM Richard Guy Briggs wrote:
> On 15/09/07, Richard Guy Briggs wrote:
> > Nothing prevents a new auditd starting up and replacing a valid
> > audit_pid when an old auditd is still running, effectively starving out
> > the old auditd since audit_pid no longer points to the old valid auditd.
> > 
> > There isn't an easy way to detect if an old auditd is still running on
> > the existing audit_pid other than attempting to send a message to see if
> > it fails.  If no message to auditd has been attempted since auditd died
> > unnaturally or got killed, audit_pid will still indicate it is alive.
> > 
> > Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> 
> Ok, self-nack on this one for a couple of problems...
> netlink_getsockbyportid() is static to af_netlink.c and "pid" should be
> task_tgid_vnr(current).  Otherwise, any opinions on this approach?
> 
> > ---
> > Note: Would it be too bold to actually block the registration of a new
> > auditd if the netlink_getsockbyportid() call succeeded?  Would other
> > checks be appropriate?

Hmm.  It seems like we should prevent the registration of a new auditd if we 
already have an auditd instance connected, although as you say, that isn't the 
easiest thing to do.

How painful would it be to return -EAGAIN to the new auditd while sending some 
sort of keep-alive/ping/etc. message to the old daemon to check its status?

-- 
paul moore
security @ redhat

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V1] audit: add warning that an old auditd may be starved out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-07 18:50 +0200
  Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-07 19:00 +0200
    Re: [PATCH V1] audit: add warning that an old auditd may be starved out by a new auditd Paul Moore <pmoore@redhat.com> - 2015-09-09 23:00 +0200
      Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-11 12:30 +0200
        Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Paul Moore <paul@paul-moore.com> - 2015-09-11 21:00 +0200
          Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-13 18:10 +0200
            Re: [PATCH V1] audit: add warning that an old auditd may be starved out by a new auditd Paul Moore <paul@paul-moore.com> - 2015-09-14 21:40 +0200
              Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-16 12:30 +0200
                Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Paul Moore <paul@paul-moore.com> - 2015-09-16 23:50 +0200
                Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-17 13:40 +0200
                Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Paul Moore <paul@paul-moore.com> - 2015-09-18 00:50 +0200
  Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Eric Paris <eparis@redhat.com> - 2015-09-08 17:00 +0200
    Re: [PATCH V1] audit: add warning that an old auditd may be starved  out by a new auditd Richard Guy Briggs <rgb@redhat.com> - 2015-09-09 08:40 +0200

csiph-web