From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: serge@hallyn.com
Cc: Andrew Morgan <morgan@kernel.org>,
"Serge E. Hallyn" <serue@us.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-security-module@vger.kernel.org,
Chris Wright <chrisw@sous-sol.org>,
Stephen Smalley <sds@epoch.ncsc.mil>,
James Morris <jmorris@namei.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] capabilities: introduce per-process capability bounding set (v10)
Date: Thu, 06 Dec 2007 11:01:01 +0900 [thread overview]
Message-ID: <475757DD.8000009@ak.jp.nec.com> (raw)
In-Reply-To: <20071204201709.GA9915@vino.hallyn.com>
>>> (Thus, the correct check says no 'new' pI bits can be outside cap_bset.)
>> If this condition intends to dominate 'new' pI bits by 'old' pI bits masked
>> with bounding set, we should not apply cap_combine() here.
>> I think applying cap_intersect() is correct for the purpose.
>
> That would have been my first inclination, but Andrew actually
> wanted to be able to keep a pI with bits not in the capability
> bounding set. And it's really not a big problem, since
>
> 1. you can never grow cap_bset
> 2. the capbound.c program just makes sure to call capset
> to take the bit being removed from cap_bset out of
> pI'
> 3. It could be advantageous for some daemon to keep a bit
> in pI which can never be gained through fP but can be
> gained by a child through (fI&pI).
>
> Does that seem reasonable to you?
OK, I got understood the intention of the condition.
It seems to me reasonable policy.
Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
This patch fixes incorrect condition added by per-process capability
bounding set patch.
It intends to limit no new pI capabilities outside bounding set.
Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
commoncap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.24-rc3/security/commoncap.c.old 2007-12-06 10:51:48.000000000 +0900
+++ linux-2.6.24-rc3/security/commoncap.c 2007-12-06 10:52:15.000000000 +0900
@@ -119,9 +119,9 @@ int cap_capset_check (struct task_struct
/* incapable of using this inheritable set */
return -EPERM;
}
- if (!!cap_issubset(*inheritable,
- cap_combine(target->cap_inheritable,
- current->cap_bset))) {
+ if (!cap_issubset(*inheritable,
+ cap_combine(target->cap_inheritable,
+ current->cap_bset))) {
/* no new pI capabilities outside bounding set */
return -EPERM;
}
next prev parent reply other threads:[~2007-12-06 2:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 20:09 [PATCH] capabilities: introduce per-process capability bounding set (v10) Serge E. Hallyn
2007-11-27 3:42 ` Andrew Morgan
2007-11-27 18:42 ` Serge E. Hallyn
2007-12-01 1:20 ` KaiGai Kohei
2007-12-01 3:58 ` serge
2007-12-01 19:10 ` Andrew Morgan
2007-12-02 3:29 ` KaiGai Kohei
2007-12-02 18:15 ` Andrew Morgan
2007-12-03 6:20 ` KaiGai Kohei
2007-12-02 1:28 ` KaiGai Kohei
2007-12-04 4:28 ` KaiGai Kohei
2007-12-04 6:14 ` Andrew Morgan
2007-12-04 15:19 ` KaiGai Kohei
2007-12-04 20:17 ` serge
2007-12-06 2:01 ` KaiGai Kohei [this message]
2007-12-05 15:31 ` Andrew Morgan
2007-12-06 2:13 ` KaiGai Kohei
2007-12-06 5:39 ` Andrew Morgan
2007-12-06 8:36 ` KaiGai Kohei
2007-12-07 0:51 ` KaiGai Kohei
2007-12-07 6:14 ` Andrew Morgan
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=475757DD.8000009@ak.jp.nec.com \
--to=kaigai@ak.jp.nec.com \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=sds@epoch.ncsc.mil \
--cc=serge@hallyn.com \
--cc=serue@us.ibm.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