From: Serge Hallyn <serge.hallyn@canonical.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
kernel-hardening@lists.openwall.com
Subject: [kernel-hardening] Re: [RFC] Make Yama pid_ns aware
Date: Wed, 23 Nov 2011 11:00:04 -0600 [thread overview]
Message-ID: <20111123170004.GA23786@serge-laptop> (raw)
In-Reply-To: <20111123165549.GB3463@albatros>
Quoting Vasiliy Kulikov (segoon@openwall.com):
> On Wed, Nov 23, 2011 at 14:49 +0000, Serge E. Hallyn wrote:
> > Quoting Vasiliy Kulikov (segoon@openwall.com):
> > > Actually, what concerns me is not ptrace, but symlink/hardling
> > > protection. There is no interaction between namespaces in case of
> > > containers via symlinks in the basic case. In case of ptrace I don't
> > > think the child ns may weaken the parent ns - child ns may not access
> > > processes of the parent namespace and everything it may ptrace is
> > > already inside of this ns.
> >
> > Oh, yes. If you're saying the symlink protection shouldn't be
> > per-pidns, I agree it seems an odd fit.
> >
> > How about a version of this patch leaving symlink protection
> > out of pidns (maybe in user ns), and just putting ptrace
> > protection per-pidns?
>
> I don't think moving symlink/hardling from pid ns to user ns is a good
> idea as user ns is not matured yet. Also we (Openwall) want to use Yama
> almost as-is in our RHEL6 and RHEL5-based kernels with OpenVZ support
> which don't have user namespaces yet at all (yes, it is not a cause for
> mainline decisions :-) ).
>
> While user ns is not yet ready, I don't clearly see what is the division
> of security policies among namespaces including user namespace. I had
> a view that all stuff related to processes (i.e. distinct processes in
> several ways) belongs to pid ns, all net stuff to net ns, etc. If we
> differentiate user ns and pid ns, only strictly things handling pids
> (like kill(2), procfs, ptrace(2), etc.) belong to pid ns and all other
> process-related stuff (like credentials handling, these symlink/hardling
> things, etc.) belong to user namespaces.
>
> Can we probably leave them in pid ns for now and when user ns is matured
> just move it from pid ns to user ns? Is it possible without breaking
> Yama's ABI (I think so)?
That's fine with me.
thanks,
-serge
WARNING: multiple messages have this Message-ID (diff)
From: Serge Hallyn <serge.hallyn@canonical.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
kernel-hardening@lists.openwall.com
Subject: Re: [RFC] Make Yama pid_ns aware
Date: Wed, 23 Nov 2011 11:00:04 -0600 [thread overview]
Message-ID: <20111123170004.GA23786@serge-laptop> (raw)
In-Reply-To: <20111123165549.GB3463@albatros>
Quoting Vasiliy Kulikov (segoon@openwall.com):
> On Wed, Nov 23, 2011 at 14:49 +0000, Serge E. Hallyn wrote:
> > Quoting Vasiliy Kulikov (segoon@openwall.com):
> > > Actually, what concerns me is not ptrace, but symlink/hardling
> > > protection. There is no interaction between namespaces in case of
> > > containers via symlinks in the basic case. In case of ptrace I don't
> > > think the child ns may weaken the parent ns - child ns may not access
> > > processes of the parent namespace and everything it may ptrace is
> > > already inside of this ns.
> >
> > Oh, yes. If you're saying the symlink protection shouldn't be
> > per-pidns, I agree it seems an odd fit.
> >
> > How about a version of this patch leaving symlink protection
> > out of pidns (maybe in user ns), and just putting ptrace
> > protection per-pidns?
>
> I don't think moving symlink/hardling from pid ns to user ns is a good
> idea as user ns is not matured yet. Also we (Openwall) want to use Yama
> almost as-is in our RHEL6 and RHEL5-based kernels with OpenVZ support
> which don't have user namespaces yet at all (yes, it is not a cause for
> mainline decisions :-) ).
>
> While user ns is not yet ready, I don't clearly see what is the division
> of security policies among namespaces including user namespace. I had
> a view that all stuff related to processes (i.e. distinct processes in
> several ways) belongs to pid ns, all net stuff to net ns, etc. If we
> differentiate user ns and pid ns, only strictly things handling pids
> (like kill(2), procfs, ptrace(2), etc.) belong to pid ns and all other
> process-related stuff (like credentials handling, these symlink/hardling
> things, etc.) belong to user namespaces.
>
> Can we probably leave them in pid ns for now and when user ns is matured
> just move it from pid ns to user ns? Is it possible without breaking
> Yama's ABI (I think so)?
That's fine with me.
thanks,
-serge
next prev parent reply other threads:[~2011-11-23 17:00 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 23:49 [PATCH v6 0/3] security: Yama LSM Kees Cook
2011-10-26 23:49 ` [PATCH 1/3] " Kees Cook
2011-10-26 23:49 ` [PATCH 2/3] security: create task_free security callback Kees Cook
2011-10-26 23:49 ` [PATCH 3/3] security: Yama: add ptrace relationship tracking interface Kees Cook
2011-11-19 16:30 ` [kernel-hardening] " Vasiliy Kulikov
2011-11-19 16:30 ` Vasiliy Kulikov
2011-11-19 16:59 ` [kernel-hardening] " Solar Designer
2011-11-19 16:59 ` Solar Designer
2011-11-21 18:40 ` [kernel-hardening] " Kees Cook
2011-11-21 18:40 ` Kees Cook
2011-11-01 20:45 ` [PATCH v6 0/3] security: Yama LSM James Morris
2011-11-01 21:05 ` Kees Cook
2011-11-01 21:37 ` James Morris
2011-11-01 23:23 ` Kees Cook
2011-11-18 4:17 ` James Morris
2011-11-18 21:39 ` Kees Cook
2011-11-18 21:45 ` Roland McGrath
2011-11-18 22:44 ` Kees Cook
2011-11-18 23:18 ` Kees Cook
2011-11-21 19:18 ` [kernel-hardening] [RFC] Make Yama pid_ns aware Vasiliy Kulikov
2011-11-21 19:18 ` Vasiliy Kulikov
2011-11-21 19:42 ` [kernel-hardening] " Kees Cook
2011-11-21 19:42 ` Kees Cook
2011-11-22 18:13 ` [kernel-hardening] " Serge Hallyn
2011-11-22 18:13 ` Serge Hallyn
2011-11-22 19:20 ` [kernel-hardening] " Vasiliy Kulikov
2011-11-22 19:20 ` Vasiliy Kulikov
2011-11-22 20:10 ` [kernel-hardening] " Serge Hallyn
2011-11-22 20:10 ` Serge Hallyn
2011-11-23 7:45 ` [kernel-hardening] " Vasiliy Kulikov
2011-11-23 7:45 ` Vasiliy Kulikov
2011-11-23 14:41 ` [kernel-hardening] " Serge Hallyn
2011-11-23 14:41 ` Serge Hallyn
2011-11-23 14:49 ` [kernel-hardening] " Serge E. Hallyn
2011-11-23 14:49 ` Serge E. Hallyn
2011-11-23 16:55 ` [kernel-hardening] " Vasiliy Kulikov
2011-11-23 16:55 ` Vasiliy Kulikov
2011-11-23 17:00 ` Serge Hallyn [this message]
2011-11-23 17:00 ` Serge Hallyn
2011-11-28 18:12 ` [kernel-hardening] " Kees Cook
2011-11-28 18:12 ` Kees Cook
2011-11-28 18:14 ` [kernel-hardening] " Vasiliy Kulikov
2011-11-28 18:14 ` Vasiliy Kulikov
2011-11-28 19:16 ` [kernel-hardening] [RFC -resend] " Vasiliy Kulikov
2011-11-28 19:16 ` Vasiliy Kulikov
2011-11-28 19:35 ` [kernel-hardening] " Kees Cook
2011-11-28 19:35 ` Kees Cook
2011-11-28 20:15 ` [kernel-hardening] " Kees Cook
2011-11-28 20:15 ` Kees Cook
2011-11-28 20:00 ` [kernel-hardening] " Serge E. Hallyn
2011-11-28 20:00 ` Serge E. Hallyn
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=20111123170004.GA23786@serge-laptop \
--to=serge.hallyn@canonical.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=segoon@openwall.com \
--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.