Skip to content

Commit cd33f5f

Browse files
committed
audit: make sure we never skip the multicast broadcast
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: linux-audit/audit-kernel#41 Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent c81be52 commit cd33f5f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kernel/audit.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,10 @@ static void auditd_reset(const struct auditd_connection *ac)
605605
if (ac_old)
606606
call_rcu(&ac_old->rcu, auditd_conn_free);
607607

608-
/* flush all of the main and retry queues to the hold queue */
608+
/* flush the retry queue to the hold queue, but don't touch the main
609+
* queue since we need to process that normally for multicast */
609610
while ((skb = skb_dequeue(&audit_retry_queue)))
610611
kauditd_hold_skb(skb);
611-
while ((skb = skb_dequeue(&audit_queue)))
612-
kauditd_hold_skb(skb);
613612
}
614613

615614
/**

0 commit comments

Comments
 (0)