public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: finit_module
Date: Sat, 05 Apr 2014 07:57:13 -0400	[thread overview]
Message-ID: <13325858.91S3hfEbTB@x2> (raw)
In-Reply-To: <20140404213725.GC2171@madcap2.tricolour.ca>

On Friday, April 04, 2014 05:37:25 PM Richard Guy Briggs wrote:
> > > In checking a system with newish kernel, 3.13.7, I noticed that
> > > sometimes 
> > > finit_module is producing PATH records. Why?
> >
> > Probably because modprobe is walking the
> >       /lib/modules/$(uname -r)/kernel/
> > tree looking for the module named.
> 
> Is modprobe forcing a depmod to run, populating:
>         /lib/modules/$(uname -r)/modules.*

No idea, because we don't know which module is being loaded. It seems like we 
might could use an auxiliary record to log some information about the module 
being inserted into the kernel. Like if it has an internal name, is it signed, 
did it taint the kernel, did the signature verify correctly?


> Does this happen at most once per boot?

There are several.


> > But...  why are all the pathnames null?
> 
> Did you try to track down what some of the dev/inode pathnames were?

No. I don't use debugfs...which is the only good clue I have.

> The number does seem high for this though, since they appear to all be
> CREATE records.
> 
> Do you have a test to provoke it?  A set of rules and a test command?

Just enable the stig.rule and reboot your system. It has:

-w /sbin/insmod -p x -k modules-add
-w /sbin/rmmod -p x -k modules-del
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b32 -S init_module -S finit_module -k module-load
-a always,exit -F arch=b64 -S init_module -S finit_module -k module-load
-a always,exit -F arch=b32 -S delete_module -k module-unload
-a always,exit -F arch=b64 -S delete_module -k module-unload


-Steve

  reply	other threads:[~2014-04-05 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 12:43 finit_module Steve Grubb
2014-04-04 18:29 ` finit_module Richard Guy Briggs
2014-04-04 21:37   ` finit_module Richard Guy Briggs
2014-04-05 11:57     ` Steve Grubb [this message]
2014-04-07 16:37 ` finit_module Eric Paris
2014-04-07 16:50   ` finit_module Steve Grubb
2014-04-07 18:29     ` finit_module Eric Paris

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