From: Steve Grubb <sgrubb@redhat.com>
To: "linux-audit@redhat.com" <linux-audit@redhat.com>
Cc: "shourya98@gmail.com" <shourya98@gmail.com>,
Shourya Jaiswal <shourya.jaiswal@citrix.com>
Subject: Re: Probable bug in auditd
Date: Wed, 20 Jan 2021 16:38:55 -0500 [thread overview]
Message-ID: <2062426.irdbgypaU6@x2> (raw)
In-Reply-To: <SA2PR03MB567451FA692CEF4BC66D0A9886A20@SA2PR03MB5674.namprd03.prod.outlook.com>
Hello,
On Wednesday, January 20, 2021 3:54:45 PM EST Shourya Jaiswal wrote:
> I have found a weird behavior in auditd. File "/abc" does not exist.
>
> audit.rules:
>
> -a always,exit -F arch=b32 -S open -S openat
>
> -a always,exit -F arch=b64 -S open -S openat
>
> A non-root user executes "echo > /abc", it doesn't get logged in audit.log.
This is because name resolution fails before it gets to audit hooks inside
the kernel. The audit hooks want to collect device, inode, permission, owner,
group, etc. IOW, things that do not exist.
> Same with "echo > /etc/abc" A non-root user executes "cat /abc", it gets
> logged in audit.log
>
> Since auditd is monitoring all the open and openat syscalls, ideally both
> the cases (i.e. read and write) should have be logged.
It's the kernel doing it. This comes up from time to time. It is logged here:
https://github.com/linux-audit/audit-kernel/issues/118
> After I execute "chmod a+w /" then "chmod a-w /", if a non-root user
> executes "echo > /abc", then it gets logged in audit.log.
>
> This looks like a bug to me. Kindly let me know if it's a bug or an
> intended feature.
This is essentially how it works. But, there will be an improvement at some
future point when issue 118 is resolved.
-Steve
> System used to test: Linux 5.4.0-56-generic #62-Ubuntu SMP x86_64 x86_64
> x86_64 GNU/Linux
>
--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit
prev parent reply other threads:[~2021-01-20 21:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 20:54 Probable bug in auditd Shourya Jaiswal
2021-01-20 21:38 ` Steve Grubb [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=2062426.irdbgypaU6@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=shourya.jaiswal@citrix.com \
--cc=shourya98@gmail.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;
as well as URLs for NNTP newsgroup(s).