From: Kees Cook <kees.cook@canonical.com>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3] security: Yama LSM
Date: Thu, 24 Jun 2010 10:02:40 -0700 [thread overview]
Message-ID: <20100624170240.GE4809@outflux.net> (raw)
In-Reply-To: <20100624002859.GA4841@hallyn.com>
On Wed, Jun 23, 2010 at 07:28:59PM -0500, Serge E. Hallyn wrote:
> > +==============================================================
> > diff --git a/fs/exec.c b/fs/exec.c
> > index e19de6a..85092e3 100644
> > --- a/fs/exec.c
> > +++ b/fs/exec.c
> > @@ -55,6 +55,7 @@
> > #include <linux/fsnotify.h>
> > #include <linux/fs_struct.h>
> > #include <linux/pipe_fs_i.h>
> > +#include <linux/ctype.h>
> >
> > #include <asm/uaccess.h>
> > #include <asm/mmu_context.h>
>
> Can you explain the fs/exec.c hunk?
Argh. This is a mis-rebase when I was working on the get_task_comm patch.
This belongs there. I will resend both.
> > + while (walker->pid > 0) {
> > + if (walker == current)
> > + break;
> > + walker = walker->real_parent;
> > + }
> > + if (walker->pid == 0)
> > + rc = -EPERM;
>
> Don't recall whether I ended up sending the email addressing this
> last time, but task->pid is the global pid, so pid==0 does mean
> what you think it does regardless of pid namespaces.
Okay, good, thanks.
> > + /* owner and follower match? */
> > + cred = current_cred();
> > + inode = dentry->d_inode;
> > + if (cred->fsuid == inode->i_uid)
> > + return 0;
>
> This'll need user-namespace luvin' at some point, but that's my problem,
> not yours.
That's going to be quite a patch. :) I'm looking forward to it!
-Kees
--
Kees Cook
Ubuntu Security Team
prev parent reply other threads:[~2010-06-24 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 18:20 [PATCH v3] security: Yama LSM Kees Cook
2010-06-24 0:28 ` Serge E. Hallyn
2010-06-24 17:02 ` Kees Cook [this message]
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=20100624170240.GE4809@outflux.net \
--to=kees.cook@canonical.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.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.