lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5f6bd1dee4ad9b43fc8c9dc1c7645b3.paul@paul-moore.com>
Date:   Tue, 07 Nov 2023 18:31:17 -0500
From:   Paul Moore <paul@...l-moore.com>
To:     Chris Riches <chris.riches@...anix.com>
Cc:     audit@...r.kernel.org, Eric Paris <eparis@...hat.com>,
        jonathan.davies@...anix.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] audit: Send netlink ACK before setting connection in  auditd_set

On Oct 18, 2023 Paul Moore <paul@...l-moore.com> wrote:
> 
> 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: Chris Riches <chris.riches@...anix.com>
> ---
> 
> > I'm happier with the bool over the integer type for the @ack variable.
> > I'd suggest updating the patch and posting it again so we can review
> > it in full, but we weren't very far off last time so I think it should
> > be close, if not acceptable on the next revision.
> 
> Here's the latest iteration of the suggested patch. I've done it via git
> send-email so it should apply cleanly.
> 
>  kernel/audit.c | 31 ++++++++++++++++++++++++-------
>  1 file changed, 24 insertions(+), 7 deletions(-)

This looks good to me, thanks for your patience and persistence Chris.

I'm going to merge this into audit/dev-staging now and it will move to
audit/dev once v6.7-rc1 is released and the merge window closes.

--
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ