linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Timothy R. Chavez" <tinytim@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-audit@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	David Woodhouse <dwmw2@infradead.org>,
	Mounir Bsaibes <mbsaibes@us.ibm.com>,
	Steve Grubb <sgrubb@redhat.com>, Serge Hallyn <serue@us.ibm.com>,
	Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	Klaus Weidner <klaus@atsec.com>, Chris Wright <chrisw@osdl.org>,
	Stephen Smalley <sds@tycho.nsa.gov>, Robert Love <rml@novell.com>,
	Christoph Hellwig <hch@infradead.org>,
	Daniel H Jones <danjones@us.ibm.com>,
	Amy Griffis <amy.griffis@hp.com>,
	Maneesh Soni <maneesh@in.ibm.com>
Subject: Re: [PATCH] audit: file system auditing based on location and name
Date: Fri, 8 Jul 2005 10:46:45 -0700	[thread overview]
Message-ID: <20050708174645.GE30908@kroah.com> (raw)
In-Reply-To: <200507071449.16280.tinytim@us.ibm.com>

On Thu, Jul 07, 2005 at 02:49:15PM -0500, Timothy R. Chavez wrote:
> 
> Even if access control prohibits us from actually seeing the content of 
> /etc/shadow, if we're auditing /etc/shadow, attempts should be logged 
> and not gone unnoticed.
> 
> watch /etc/shadow
> passwd
> <inode changes before execution ends>
> cat /etc/shadow (goes unaudited)
> <send event to user space>
> ln /etc/shadow /home/foo/evil_shadow (goes unaudited)
> <process in user space>
> cat /home/foo/evil_shadow (goes unaudited)
> <send back instructions to kernel to watch the new /etc/shadow>
> cat /etc/shadow (audited)
> 
> Hmmm...

Then you watch the directory /etc/ which would have caught all of this,
right?  My argument is that wouldn't inotify also want to know this
exact same thing?

> > > I've yet to be convinced that merging these two projects or implementing 
> > > one in terms of the other has any real benefit to either project in terms of
> > > their individual goals and requirements.
> > 
> > You have common hooks in the kernel.  You do almost the same thing
> > (report fs changes to userspace.)  Seems a natural thing to me.
> 
> This patch reports "fs changes" to the audit subsystem which then adds them 
> to the audit_context of the current task.  Then, at system call exit, the audit_context 
> is sent to user space, effectively logging not only the "fs change", but information 
> regarding the process, system call, path, etc, to give the complete account.

Great, so your userspace notification is different than inotify, that's
fine.  But what you are trying to do within the kernel is pretty much
the same, which is my main point.

> > > The only real similarty between the two projects from my POV is that they 
> > > are both interested in reporting a subset of file system activity and could 
> > > benefit from a set of common hooks (ie: fsnotify) where it makes sense.
> > 
> > Exactly.  What else is there?
> 
> The fact that audit is interested in more activity then Inotify (like permission()),

Fine, inotify users can just ignore those messages.  Or perhaps they
will grow to want to see them.

> must strive to never lose events,

Why is this not a good goal for inotify to also have?

> interacts with the audit subsystem directly, 

Ok, a difference.

> must conform to security requirements placed on it by various
> Protection Profiles (for the time being, CAPP),

And those "security requirements" are what?

> defers sending the event record to user space until system call exit,

Again, not a big deal for inotify.

> the inode is relevant only if it's associated with the last component
> of an audited path (not just the inode targetted initially)...

Again, something that I think inotify would like to also know.

> And I'm sure Robert could point out things that Inotify does that
> audit doesn't do (and isn't very interested in doing).

Sure, just because you all do some things differently, doesn't mean that
you shouldn't use the same core code.

Now I know you don't want to worry about another project's code getting
into the kernel tree to depend on your changes, but hey, that's life.
Try working with the inotify developers instead of ignoring them and
duplicating the same stuff.

Also, you still have not pointed out what auditfs is for and how to use
it.

thanks,

greg k-h

  reply	other threads:[~2005-07-08 17:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 16:54 [PATCH] audit: file system auditing based on location and name Timothy R. Chavez
2005-07-06 17:17 ` Greg KH
2005-07-06 20:23 ` Timothy R. Chavez
2005-07-06 23:50   ` Greg KH
2005-07-07  1:33     ` Steve Grubb
2005-07-07 18:15       ` Greg KH
2005-07-07 18:49         ` Steve Grubb
2005-07-07 19:04           ` Greg KH
2005-07-07 19:48             ` Steve Grubb
2005-07-07 21:31               ` Arjan van de Ven
2005-07-07 22:08                 ` Timothy R. Chavez
2005-07-07 22:51                   ` serue
2005-07-08  5:33                     ` Arjan van de Ven
2005-07-08  5:48                       ` James Morris
2005-07-08 17:48               ` Greg KH
2005-07-07 16:26     ` Timothy R. Chavez
2005-07-07 18:10       ` Greg KH
2005-07-07 18:16         ` David Woodhouse
2005-07-07 18:18           ` Greg KH
2005-07-07 19:49         ` Timothy R. Chavez
2005-07-08 17:46           ` Greg KH [this message]
2005-07-08 19:48             ` Timothy R. Chavez
2005-07-10 18:59               ` Greg KH
     [not found]                 ` <OF993CB74B.E135A576-ON8725703B.00568CD6-0525703B.005814C3@us.ibm.com>
2005-07-11 17:13                   ` Greg KH
2005-07-09  1:10   ` Chris Wright
2005-07-09  2:10     ` Timothy R. Chavez
2005-07-07  6:40 ` Arjan van de Ven
2005-07-07  6:50   ` David Woodhouse

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=20050708174645.GE30908@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=amy.griffis@hp.com \
    --cc=chrisw@osdl.org \
    --cc=danjones@us.ibm.com \
    --cc=dwmw2@infradead.org \
    --cc=hch@infradead.org \
    --cc=klaus@atsec.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    --cc=mbsaibes@us.ibm.com \
    --cc=rml@novell.com \
    --cc=sds@tycho.nsa.gov \
    --cc=serue@us.ibm.com \
    --cc=sgrubb@redhat.com \
    --cc=tinytim@us.ibm.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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).