]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
audit: make sure we never skip the multicast broadcast
authorPaul Moore <paul@paul-moore.com>
Mon, 12 Jun 2017 15:53:09 +0000 (11:53 -0400)
committerPaul Moore <paul@paul-moore.com>
Fri, 16 Jun 2017 15:51:00 +0000 (11:51 -0400)
When the auditd connection is reset, either intentionally or due to
a failure, any records that were in the main backlog queue would not
be sent in a multicast broadcast.  This patch fixes this problem by
not flushing the main backlog queue on a connection reset, the main
kauditd_thread() will take care of that normally.

Resolves: https://github.com/linux-audit/audit-kernel/issues/41
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.c

index e1e2b3abfb93ef46a685e9ad55760674f7ddb135..7cad70214b81a1639b0af97b131cbe3db0d46cbf 100644 (file)
@@ -605,11 +605,10 @@ static void auditd_reset(const struct auditd_connection *ac)
        if (ac_old)
                call_rcu(&ac_old->rcu, auditd_conn_free);
 
-       /* flush all of the main and retry queues to the hold queue */
+       /* flush the retry queue to the hold queue, but don't touch the main
+        * queue since we need to process that normally for multicast */
        while ((skb = skb_dequeue(&audit_retry_queue)))
                kauditd_hold_skb(skb);
-       while ((skb = skb_dequeue(&audit_queue)))
-               kauditd_hold_skb(skb);
 }
 
 /**