Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20277842 authored by Chris Riches's avatar Chris Riches Committed by Greg Kroah-Hartman
Browse files

audit: Send netlink ACK before setting connection in auditd_set



[ Upstream commit 022732e3d846e197539712e51ecada90ded0572a ]

When auditd_set sets the auditd_conn pointer, audit messages can
immediately be put on the socket by other kernel threads. If the backlog
is large or the rate is high, this can immediately fill the socket
buffer. If the audit daemon requested an ACK for this operation, a full
socket buffer causes the ACK to get dropped, also setting ENOBUFS on the
socket.

To avoid this race and ensure ACKs get through, fast-track the ACK in
this specific case to ensure it is sent before auditd_conn is set.

Signed-off-by: default avatarChris Riches <chris.riches@nutanix.com>
[PM: fix some tab vs space damage]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 27756ae3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment