From: Steve Grubb <sgrubb@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: Linux-Audit Mailing List <linux-audit@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names
Date: Tue, 13 Mar 2018 11:38:15 +0100 [thread overview]
Message-ID: <20180313113815.187da185@ivy-bridge> (raw)
In-Reply-To: <20180313101108.s6o7jec57rsxpsmc@madcap2.tricolour.ca>
On Tue, 13 Mar 2018 06:11:08 -0400
Richard Guy Briggs <rgb@redhat.com> wrote:
> On 2018-03-13 09:35, Steve Grubb wrote:
> > On Mon, 12 Mar 2018 11:52:56 -0400
> > Richard Guy Briggs <rgb@redhat.com> wrote:
> >
> > > On 2018-03-12 11:53, Paul Moore wrote:
> > > > On Mon, Mar 12, 2018 at 11:26 AM, Richard Guy Briggs
> > > > <rgb@redhat.com> wrote:
> > > > > On 2018-03-12 11:12, Paul Moore wrote:
> > > > >> On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs
> > > > >> <rgb@redhat.com> wrote:
> > > > >> > Audit link denied events for symlinks had duplicate PATH
> > > > >> > records rather than just updating the existing PATH record.
> > > > >> > Update the symlink's PATH record with the current dentry
> > > > >> > and inode information.
> > > > >> >
> > > > >> > See: https://github.com/linux-audit/audit-kernel/issues/21
> > > > >> > Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> > > > >> > ---
> > > > >> > fs/namei.c | 1 +
> > > > >> > 1 file changed, 1 insertion(+)
> > > > >>
> > > > >> Why didn't you include this in patch 4/4 like I asked during
> > > > >> the previous review?
> > > > >
> > > > > Please see the last comment of:
> > > > > https://www.redhat.com/archives/linux-audit/2018-March/msg00070.html
> > > >
> > > > Yes, I just saw that ... I hadn't seen your replies on the v1
> > > > patches until I had finished reviewing v2. I just replied to
> > > > that mail in the v1 thread, but basically you need to figure
> > > > out what is necessary here and let us know. If I have to
> > > > figure it out it likely isn't going to get done with enough
> > > > soak time prior to the upcoming merge window.
> > >
> > > Steve? I was hoping you could chime in here.
> >
> > If the CWD record will always be the same as the PARENT record,
> > then we do not need the parent record. Duplicate information is
> > bad. Like all the duplicate SYSCALL information.
>
> The CWD record could be different from the PARENT record, since I
> could have SYMLINK=/tmp/test/symlink, CWD=/tmp, PARENT=/tmp/test.
> Does the parent record even matter since it might not be a directory
> operation like creat, unlink or rename?
There's 2 issues. One is creating the path if what we have is relative.
In this situation CWD should be enough. But if the question is whether
the PARENT directory should be included...what if the PARENT
permissions do not allow the successful name resolution? In that case
we might only get a PARENT record no? In that case we would need it.
-Steve
> > > I'd just include it for completeness unless Steve thinks it will
> > > stand on its own and doesn't want the overhead.
> > >
> > > > >> > diff --git a/fs/namei.c b/fs/namei.c
> > > > >> > index 50d2533..00f5041 100644
> > > > >> > --- a/fs/namei.c
> > > > >> > +++ b/fs/namei.c
> > > > >> > @@ -945,6 +945,7 @@ static inline int
> > > > >> > may_follow_link(struct nameidata *nd) if (nd->flags &
> > > > >> > LOOKUP_RCU) return -ECHILD;
> > > > >> >
> > > > >> > + audit_inode(nd->name, nd->stack[0].link.dentry, 0);
> > > > >> > audit_log_link_denied("follow_link",
> > > > >> > &nd->stack[0].link); return -EACCES;
> > > > >> > }
> > > > >>
> > > > >> paul moore
> > > > >
> > > > > - RGB
> > > >
> > > > paul moore
> > >
> > > - RGB
>
> - RGB
>
> --
> Richard Guy Briggs <rgb@redhat.com>
> Sr. S/W Engineer, Kernel Security, Base Operating Systems
> Remote, Ottawa, Red Hat Canada
> IRC: rgb, SunRaycer
> Voice: +1.647.777.2635, Internal: (81) 32635
next prev parent reply other threads:[~2018-03-13 10:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 6:31 [PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records Richard Guy Briggs
2018-03-12 6:31 ` Richard Guy Briggs
2018-03-12 6:31 ` [PATCH ghak21 V2 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context Richard Guy Briggs
2018-03-12 6:31 ` Richard Guy Briggs
2018-03-12 15:01 ` Paul Moore
2018-03-12 6:31 ` [PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record Richard Guy Briggs
2018-03-12 6:31 ` Richard Guy Briggs
2018-03-12 15:05 ` Paul Moore
2018-03-12 15:30 ` Richard Guy Briggs
2018-03-12 15:56 ` Paul Moore
2018-03-12 18:22 ` kbuild test robot
2018-03-12 18:22 ` kbuild test robot
2018-03-13 4:21 ` Richard Guy Briggs
2018-03-12 6:31 ` [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names Richard Guy Briggs
2018-03-12 6:31 ` Richard Guy Briggs
2018-03-12 15:12 ` Paul Moore
2018-03-12 15:26 ` Richard Guy Briggs
2018-03-12 15:53 ` Paul Moore
2018-03-12 15:52 ` Richard Guy Briggs
2018-03-12 16:08 ` Paul Moore
2018-03-13 8:35 ` Steve Grubb
2018-03-13 10:11 ` Richard Guy Briggs
2018-03-13 10:38 ` Steve Grubb [this message]
2018-03-13 10:52 ` Richard Guy Briggs
2018-03-13 12:13 ` Steve Grubb
2018-03-13 20:24 ` Paul Moore
2018-03-14 5:23 ` Richard Guy Briggs
2018-03-12 6:31 ` [PATCH ghak21 V2 4/4] audit: add parent of " Richard Guy Briggs
2018-03-12 6:31 ` Richard Guy Briggs
2018-03-12 15:45 ` Paul Moore
2018-03-12 8:08 ` [PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records Richard Guy Briggs
2018-03-12 8:08 ` Richard Guy Briggs
2018-03-12 15:17 ` Steve Grubb
2018-03-12 15:17 ` Steve Grubb
2018-03-12 15:49 ` Paul Moore
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=20180313113815.187da185@ivy-bridge \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.