public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: LC Bruzenak <lenny@magitekltd.com>
To: Eric Paris <eparis@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [RFC][PATCH] audit: log join and part events to the read-only multicast log socket
Date: Wed, 22 Oct 2014 14:36:43 -0500	[thread overview]
Message-ID: <5448074B.8080706@magitekltd.com> (raw)
In-Reply-To: <1414001880.30946.94.camel@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 3598 bytes --]

On 10/22/2014 01:18 PM, Eric Paris wrote:
> On Wed, 2014-10-22 at 10:51 -0500, LC Bruzenak wrote:
>> On 10/22/2014 10:12 AM, Eric Paris wrote:
>>> On Wed, 2014-10-22 at 10:25 -0400, Steve Grubb wrote:
>>>
>>>> 1) For the *at syscalls, can we get the path from the FD being passed to be
>>>> able to reconstruct what is being accessed?
>>> You might sometimes be able to get A path.  But every time anyone ever
>>> says THE path they've already lost.  There is no THE path.  There might
>>> be NO path.  Every single request with THE path is always doomed to
>>> fail.
>> IIUC we've got to have some assurance that the path is legit for forensics.
>> Technically I believe I understand and concur with what you are saying
>> Eric, but as a guy on the far end of the process I know I need to be
>> able to reference a complete path to a FD.
>> One which we believe did exist at the time the mod occurred. To me,
>> sometimes isn't really good enough. But A path probably is.
>> ...
> >From the PoV of the process in question there was, at some point, A
> path.  That I agree with.  But imagine I clone a new mount  namespace
> and don't share my changes with the parent namespace.  Now I mount
> something new in that child namespace.  What is A path for a file in the
> new mount?  From the parent namespace there is NO path, ABSOLUTELY NO
> PATH.  (guess which mount namespace auditd lives in, by the way).  From
> the PoV of the processes in the child mount namespace there is A path,
> but it's possibly/probably completely meaningless to the
> admin.  /etc/shadow != /etc/shadow the admin cares about...  readlink()
> doesn't work in this case either.  Sometimes there just plain is no
> path.  So yeah, I'm betting MOST of the time we can come up with A path,
> but that's not exactly what you want either   :-(
OK; interesting case. Now I hate namespaces.
:-)

Perhaps we'll have to get smarter in order to be able to work backwards
through namespaces.
Or if not solvable, maybe some of us will have to decide to not allow
ad-hoc mounted namespaces. Just saying. This stuff matters.
I'm assuming we get the namespace info in userland audit events? My
RHEL6 versions are behind where you guys are...
>
>>>> 9) Can we get events for a watched file even when a user's permissions do not
>>>> allow full path resolution?
>>> No.
>> No?
> Say I set a watch for failure to open /path/to/my/file.
> If someone comes along and says open(/path/to/my/file) but they do not
> have execute permissions on /path/to/ their request will be denied.  Not
> because they didn't have permission to open /path/to/my/file, but
> because they didn't have permission to open /path/to.  Watches do not,
> and can not, emit a rule for that.  The rule you requested (failure to
> open /path/to/my/file) was not violated.  The kernel did not try to
> open /path/to/my/file.  It tried to open /path/to/ and died right there.
> If you care about things being unable to open /path/to/, put a watch
> on /path/to (although I'm not 100% such watches actually work, but at
> least the theory is right and maybe that could be fixed)
I didn't match the "no" answer to what I read to be a more general question.
Per the STIG (& added) rules there are exit watches for EACCES and
EPERM, which IIUC would be caught in your example. Not all the way down
to the end of the path but to the point of failure. Good enough.
So I probably misinterpreted the question. Your answer cleared it up
nicely; thanks.

Thx,
LCB

-- 
LC (Lenny) Bruzenak
lenny@magitekltd.com



[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-10-22 19:36 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 18:23 [RFC][PATCH] audit: log join and part events to the read-only multicast log socket Richard Guy Briggs
2014-10-07 19:03 ` Eric Paris
2014-10-07 19:39   ` Richard Guy Briggs
2014-10-07 22:06     ` Paul Moore
2014-10-11 15:42       ` Steve Grubb
2014-10-11 20:00         ` Paul Moore
2014-10-21 16:41     ` Richard Guy Briggs
2014-10-21 19:56   ` Steve Grubb
2014-10-21 21:08     ` Richard Guy Briggs
2014-10-21 21:40       ` Steve Grubb
2014-10-29 20:23         ` Richard Guy Briggs
2014-10-21 22:30       ` Eric Paris
2014-10-21 23:14         ` Paul Moore
2014-10-22  1:18         ` Richard Guy Briggs
2014-10-22 14:30         ` Steve Grubb
2014-10-21 22:30     ` Paul Moore
2014-10-22  1:24       ` Richard Guy Briggs
2014-10-22 13:34         ` Paul Moore
2014-10-29 21:09           ` Richard Guy Briggs
2014-10-22 14:34         ` Steve Grubb
2014-10-22 14:25       ` Steve Grubb
2014-10-22 14:30         ` Eric Paris
2014-10-22 14:36           ` Steve Grubb
2014-10-22 15:08             ` Eric Paris
2014-10-22 15:12         ` Eric Paris
2014-10-22 15:51           ` LC Bruzenak
2014-10-22 16:24             ` Steve Grubb
2014-10-22 18:18             ` Eric Paris
2014-10-22 19:36               ` LC Bruzenak [this message]
2014-10-22 20:00               ` Steve Grubb
2014-10-22 15:28         ` Paul Moore
2014-10-22 17:56           ` Steve Grubb
2014-10-22 20:06             ` Paul Moore
2014-10-22 20:34               ` LC Bruzenak
2014-10-22 20:44                 ` Paul Moore
2014-10-22 21:11                   ` LC Bruzenak
2014-10-22 21:29                     ` Paul Moore
2014-10-23 14:19                       ` LC Bruzenak
2014-10-23 19:08                         ` Paul Moore
2014-10-22 20:39               ` Steve Grubb
2014-10-22 21:00                 ` Paul Moore
2014-10-22 21:18                   ` Steve Grubb
2014-10-23 19:15                     ` Paul Moore
2014-10-30 14:55                 ` Richard Guy Briggs
2014-10-30 14:48             ` Typo in AUDIT_FEATURE_CHANGE events [was: Re: [RFC][PATCH] audit: log join and part events to the read-only multicast log socket] Richard Guy Briggs
2014-10-30 15:10               ` Steve Grubb
2014-10-30 15:23                 ` Richard Guy Briggs
2014-10-29 21:38         ` [RFC][PATCH] audit: log join and part events to the read-only multicast log socket Richard Guy Briggs

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=5448074B.8080706@magitekltd.com \
    --to=lenny@magitekltd.com \
    --cc=eparis@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