From: Seth Forshee <seth.forshee@canonical.com>
To: Paul Moore <pmoore@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH] audit: make sure we don't let the retry queue grow without bounds
Date: Mon, 10 Apr 2017 21:39:28 -0500 [thread overview]
Message-ID: <20170411023928.GG4689@ubuntu-hedt> (raw)
In-Reply-To: <149185766728.14543.3818679159914063670.stgit@sifl>
On Mon, Apr 10, 2017 at 04:54:27PM -0400, Paul Moore wrote:
> From: Paul Moore <paul@paul-moore.com>
>
> The retry queue is intended to provide a temporary buffer in the case
> of transient errors when communicating with auditd, it is not meant
> as a long life queue, that functionality is provided by the hold
> queue.
>
> This patch fixes a problem identified by Seth where the retry queue
> could grow uncontrollably if an auditd instance did not connect to
> the kernel to drain the queues. This commit fixes this by doing the
> following:
>
> * Make sure we always call auditd_reset() if we decide the connection
> with audit is really dead. There were some cases in
> kauditd_hold_skb() where we did not reset the connection, this patch
> relocates the reset calls to kauditd_thread() so all the error
> conditions are caught and the connection reset. As a side effect,
> this means we could move auditd_reset() and get rid of the forward
> definition at the top of kernel/audit.c.
>
> * We never checked the status of the auditd connection when
> processing the main audit queue which meant that the retry queue
> could grow unchecked. This patch adds a call to auditd_reset()
> after the main queue has been processed if auditd is not connected,
> the auditd_reset() call will make sure the retry and hold queues are
> correctly managed/flushed so that the retry queue remains reasonable.
>
> Reported-by: Seth Forshee <seth.forshee@canonical.com>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
That fixes the issues I reported. The fix is also needed in 4.10 stable.
Thanks,
Seth
next prev parent reply other threads:[~2017-04-11 2:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 20:54 [PATCH] audit: make sure we don't let the retry queue grow without bounds Paul Moore
2017-04-10 21:04 ` Paul Moore
2017-04-11 2:39 ` Seth Forshee [this message]
2017-04-11 14:44 ` Paul Moore
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=20170411023928.GG4689@ubuntu-hedt \
--to=seth.forshee@canonical.com \
--cc=linux-audit@redhat.com \
--cc=pmoore@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