linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: kernel-hardening@lists.openwall.com, James Morris <jmorris@namei.org>
Cc: Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Roland McGrath <roland@hack.frob.com>
Subject: Re: [kernel-hardening] [PATCH 2/2] security: Yama LSM
Date: Tue, 20 Dec 2011 09:36:59 +0400	[thread overview]
Message-ID: <20111220053659.GC2537@albatros> (raw)
In-Reply-To: <20111220053541.GB2537@albatros>

Sorry, dropped James from cc.

On Tue, Dec 20, 2011 at 09:35 +0400, Vasiliy Kulikov wrote:
> Hi,
> 
> On Tue, Dec 20, 2011 at 07:52 +1100, James Morris wrote:
> > On Mon, 19 Dec 2011, Kees Cook wrote:
> > > On Mon, Dec 19, 2011 at 11:33:10AM +1100, James Morris wrote:
> > > > On Thu, 15 Dec 2011, Kees Cook wrote:
> > > > > +#ifdef CONFIG_SECURITY_YAMA
> > > > > +	ns->ptrace_scope = parent_pid_ns->ptrace_scope;
> > > > > +#endif
> > > > > +
> > > > 
> > > > I'd like to see this implemented as an LSM hook, something like 
> > > > security_ptrace_set_scope().
> > > 
> > > I must be dense, but I fail to understand the purpose of this. The "ptrace
> > > scope" implemented by Yama is a sysctl, not an system interface. I don't
> > > understand why (or where) other LSMs would want to catch changing this.
> > > Can you explain what you're looking for in more detail?
> > > 
> > 
> > We should not see YAMA-specific code in the core kernel.  However you do 
> > it, the above should happen in LSM.
> 
> Probably this should be security_pid_namespace_create() instead of
> security_ptrace_set_scope()?  (Or even use create an analog of
> register_pernet_subsys() for pid_ns.)
> 
> Then have ->ptrace_scope and similar things as per-LSM private variables
> like in task_struct->cred->security.  ns->security should be dynamically
> allocated.
> 
> Thanks,
> 
> -- 
> Vasiliy

  reply	other threads:[~2011-12-20  5:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16  6:33 [PATCH v8 0/2] security: Yama LSM Kees Cook
2011-12-16  6:33 ` [PATCH 1/2] security: create task_free security callback Kees Cook
2011-12-16  6:33 ` [PATCH 2/2] security: Yama LSM Kees Cook
2011-12-19  0:33   ` [kernel-hardening] " James Morris
2011-12-19 19:41     ` Kees Cook
2011-12-19 20:52       ` James Morris
2011-12-19 22:22         ` Kees Cook
2011-12-20  5:35         ` Vasiliy Kulikov
2011-12-20  5:36           ` Vasiliy Kulikov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-19 22:17 [PATCH v9 0/2] " Kees Cook
2011-12-19 22:17 ` [PATCH 2/2] " Kees Cook
2011-12-21  5:25   ` [kernel-hardening] " John Johansen
2011-12-21 20:18     ` Kees Cook

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=20111220053659.GC2537@albatros \
    --to=segoon@openwall.com \
    --cc=jmorris@namei.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=roland@hack.frob.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;
as well as URLs for NNTP newsgroup(s).