From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: "Andrew G. Morgan" <morgan@kernel.org>
Cc: "Chris Wright" <chrisw@sous-sol.org>,
"Serge E. Hallyn" <serue@us.ibm.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bugfix: was Re: [ linus-git ] prctl(PR_SET_KEEPCAPS, ...) is broken for some configs, e.g. CONFIG_SECURITY_SELINUX
Date: Wed, 11 Jun 2008 16:21:17 +0200 [thread overview]
Message-ID: <b647ffbd0806110721v187d2aadxf0e4395ea977f1af@mail.gmail.com> (raw)
In-Reply-To: <484F1E63.8070408@kernel.org>
2008/6/11 Andrew G. Morgan <morgan@kernel.org>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris Wright wrote:
> |> + switch (option) {
> |> + case PR_CAPBSET_READ:
> |> + *rc_p = (cap_valid(arg2) ? 1 : -EINVAL);
> |> + break;
> |
> | Do we need this one? It's new to 2.6.25, so I think we could not
> | worry about emulating it here.
>
> We're talking about 'fixing' 2.6.26 no? I'd rather not open up the
> possibility that I have to 'fix' it again because of dropping a feature
> of 2.6.25... (Forgive me if I sound like I'm climbing out of a septic
> tank here.)
>
> Dmitry: please verify this change addresses your problem...
well, I fixed it on my side with another approach before sending a
report for this "problem".
It was not immediatelly clear to me that the concept of "process
capabilities" (as described in "man prctl" as follows
"Set the state of the process's "keep capabilities" flag...")
is not applicable to all possible configuration, meaning that each
configuration have to support it in some way or another.
Moreover, according to commit's description the changes were supposed
to be 'nop' for all configs besides when one freshly ntroduced is
enabled.
Should it have been explicitly specified that thanks to this commit
prctl(KEEPCAPS, ...) turns into "a good citizen" (i.e. stops lying to
userspace about its support of capabilities -- if that's what is
desired), it'd change a further flow of events :-)
ok, anyway, I don't have access to my machine at the moment and can't
guarantee that I'll be able to do a test today.
You may try it with one of the configs I mentioened + a program doing
prctl(KEEPCAPS, 1, ...).
>From what I see, yes, it should address this issue.
btw., if I recall right capget() is still "lying" now. capset() did
give an error but Ubuntu's dhclient is somewhat inconsistent as it
checks for a return value of prctl() but not capset().
>
> Cheers
>
> Andrew
--
Best regards,
Dmitry Adamushko
next prev parent reply other threads:[~2008-06-11 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-08 13:38 Dmitry Adamushko
2008-06-08 15:10 ` Andrew Morgan
2008-06-08 18:06 ` Andrew Morton
2008-06-08 22:34 ` Andrew Morgan
2008-06-08 23:39 ` Andrew Morton
2008-06-09 17:17 ` Serge E. Hallyn
2008-06-10 4:26 ` [PATCH] bugfix: was " Andrew G. Morgan
2008-06-10 5:21 ` Andrew Morton
2008-06-10 19:12 ` Serge E. Hallyn
2008-06-11 0:39 ` Andrew G. Morgan
2008-06-10 19:14 ` Chris Wright
2008-06-11 0:37 ` Andrew G. Morgan
2008-06-11 14:21 ` Dmitry Adamushko [this message]
2008-06-10 16:12 ` Chris Wright
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=b647ffbd0806110721v187d2aadxf0e4395ea977f1af@mail.gmail.com \
--to=dmitry.adamushko@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=serue@us.ibm.com \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®