summaryrefslogtreecommitdiff
path: root/samples/watchdog
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2017-04-10 11:16:59 -0400
committerPaul Moore <paul@paul-moore.com>2017-04-10 11:16:59 -0400
commit264d509637d95f9404e52ced5003ad352e0f6a26 (patch)
tree7dffec0852cfd6cc685466edb9dc6584a58b85b4 /samples/watchdog
parentab6434a1377a768a1e6d3e6cf819eb21724a99c2 (diff)
audit: make sure we don't let the retry queue grow without bounds
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. Cc: <stable@vger.kernel.org> # 4.10.x-: 5b52330bbfe6 Reported-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'samples/watchdog')
0 files changed, 0 insertions, 0 deletions