Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: -F dir=/nfs/path ?
Date: Fri, 06 Jul 2012 14:18:41 -0400	[thread overview]
Message-ID: <1808076.PZP4QESpkR@x2> (raw)
In-Reply-To: <CALnj_=7NU-wXti3k=Fb0zRFOi_3BOOtWA3jbrzeGTaPkDRwn2w@mail.gmail.com>

On Wednesday, June 27, 2012 09:14:04 AM Peter Moody wrote:
> Did some digging and this is my understanding. Please correct me if
> I'm grossly mistaken.
> 
> -F dir=foo is a tree rule, not a watch rule.

Correct.


> At syscall exit time, audit_filter_syscall is called which checks the
> parameters of
> the syscall against each of the installed rules.
> 
> When it gets to the dir rule, it checks to see if the 'tree'
> associated with the given
> task matches the 'associated' with the rule, basically walking up the
> path from '/' to
> the end to see if it matches the given rule tree.
> 
> There should be no extra nfs traffic, and there should be no blowing
> up of inotify/fsnotify watch lists for something like this.
> 
> kernel callpath:
> call __audit_syscall_exit arch/x86/kernel/entry_32|64.S
>  __audit_free kernel/auditsc.c:1752
>  audit_get_context kernel/auditsc.c:957
>   audit_filter_syscall kernel/auditsc.c:877
>    audit_filter_rules kernel/auditsc.c:603
>     match_tree_refs kernel/auditsc.c:444
>      audit_tree_match kernel/audit_tree.c:198
> 
> Does that sound right?

I'm not sure NFS is supported. I don't remember the reason as its been a long 
time. But if you have NFS for a home dir, then it should be easy to test.

-Steve

 
> On Tue, Jun 26, 2012 at 11:01 AM, Peter Moody <pmoody@google.com> wrote:
> > How does auditd perform on a rule like the following, assuming that
> > /home/ is an nfs mount?
> > 
> > -a exit,always -F arch=b64 -S open -F dir=/home/ -F a2&2 -F success=1
> > -C euid!=obj_uid -k
> > 
> > Does this become a watch rule (and to watch rules even work with nfs)?
> > Assuming that the mount map for /home/ is giant (several K entries),
> > does this run the risk of filling fsnotify (inotify?) watch lists?
> > 
> > Cheers,
> > peter
> > 
> > --
> > Peter Moody      Google    1.650.253.7306
> > Security Engineer  pgp:0xC3410038

  reply	other threads:[~2012-07-06 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 18:01 -F dir=/nfs/path ? Peter Moody
2012-06-27 16:14 ` Peter Moody
2012-07-06 18:18   ` Steve Grubb [this message]
2012-07-06 23:58     ` Peter Moody

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=1808076.PZP4QESpkR@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@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