From: Paul Moore <paul@paul-moore.com>
To: Richard Guy Briggs <rgb@redhat.com>,
Linux-Audit Mailing List <linux-audit@lists.linux-audit.osci.io>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
Linux Kernel Audit Mailing List <audit@vger.kernel.org>
Cc: Eric Paris <eparis@parisplace.org>,
Steve Grubb <sgrubb@redhat.com>,
Richard Guy Briggs <rgb@redhat.com>, Jan Kara <jack@suse.cz>,
Amir Goldstein <amir73il@gmail.com>
Subject: Re: [PATCH v1 2/2] audit: record AUDIT_ANOM_* events regardless of presence of rules
Date: Fri, 11 Apr 2025 14:14:20 -0400 [thread overview]
Message-ID: <6ab93e8c449191e0a65668cf37602bd2@paul-moore.com> (raw)
In-Reply-To: <0b569667efde7c91992bf3ea35b40c3a8f10e384.1741210251.git.rgb@redhat.com>
On Mar 5, 2025 Richard Guy Briggs <rgb@redhat.com> wrote:
>
> When no audit rules are in place, AUDIT_ANOM_{LINK,CREAT} events
> reported in audit_log_path_denied() are unconditionally dropped due to
> an explicit check for the existence of any audit rules. Given this is a
> report of a security violation, allow it to be recorded regardless of
> the existence of any audit rules.
>
> To test,
> mkdir -p /root/tmp
> chmod 1777 /root/tmp
> touch /root/tmp/test.txt
> useradd test
> chown test /root/tmp/test.txt
> {echo C0644 12 test.txt; printf 'hello\ntest1\n'; printf \\000;} | \
> scp -t /root/tmp
> Check with
> ausearch -m ANOM_CREAT -ts recent
>
> Link: https://issues.redhat.com/browse/RHEL-9065
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
> kernel/audit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks okay to me, merged into audit/dev, thanks!
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 53e3bddcc327..0cf2827882fc 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -2285,7 +2285,7 @@ void audit_log_path_denied(int type, const char *operation)
> {
> struct audit_buffer *ab;
>
> - if (!audit_enabled || audit_dummy_context())
> + if (!audit_enabled)
> return;
>
> /* Generate log with subject, operation, outcome. */
> --
> 2.43.5
--
paul-moore.com
prev parent reply other threads:[~2025-04-11 18:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 21:33 [PATCH v1 0/2] override audit silence norule for fs cases Richard Guy Briggs
2025-03-05 21:33 ` [PATCH v1 1/2] audit: record fanotify event regardless of presence of rules Richard Guy Briggs
2025-03-06 15:06 ` Jan Kara
2025-03-07 1:12 ` Richard Guy Briggs
2025-03-07 14:52 ` Jan Kara
2025-03-07 19:19 ` Richard Guy Briggs
2025-03-10 12:50 ` Jan Kara
2025-04-11 18:14 ` Paul Moore
2025-05-27 13:09 ` Richard Guy Briggs
2025-05-30 0:01 ` Paul Moore
2025-08-06 21:04 ` Richard Guy Briggs
2025-03-05 21:33 ` [PATCH v1 2/2] audit: record AUDIT_ANOM_* events " Richard Guy Briggs
2025-04-11 18:14 ` Paul Moore [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ab93e8c449191e0a65668cf37602bd2@paul-moore.com \
--to=paul@paul-moore.com \
--cc=amir73il@gmail.com \
--cc=audit@vger.kernel.org \
--cc=eparis@parisplace.org \
--cc=jack@suse.cz \
--cc=linux-audit@lists.linux-audit.osci.io \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rgb@redhat.com \
--cc=sgrubb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox