lkml.org 
[lkml]   [2003]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: posix capabilities inheritance
Andy Lutomirski wrote:
> 1. Can a process have capabilities in its inheritable set and not
> in its permitted set? POSIX allows such processes to be created
> (pI = pP = full, then execute (fI = 0, fP = 0).

Sure, this is apparent to me in reading the spec. I'm not exactly
sure if this is relavent though: if pP = pE = 0, it does not seem
like it should be possible for pI=full to have any effect on exec,
unless I am missing something.

> Nevertheless, its pP evolution rule assumes that this never happens
> (pI capabilities can reappear).

Certainly with the current rule as implemented in 2.4, it looks as
though you can regain permitted flags: pP' = (fP & X) | (fI & pI)

Is this what you mean when you say they can reappear? WRT the
spec itself, I don't see this assumption. The rule could just as
easily be: pP' = (fP & X) | (pP & fI & pI) (just an example)
The rule in your patch seems like it should be compliant as well.

I'm not saying there aren't some problems to be worked out with
the spec; I think there are. But I don't think this is a case of
the spec being broken per se -- just too vague.

> 2. If a process has pE < pP (i.e. some caps disabled, e.g. uid=0,
> euid!=0), and exec's fE=full, then its capabilities get re-enabled.
> This seems like a pretty serious breakage of userspace.

How is this any different from traditional *nix setuid semantics?
I suppose I can see your point somewhat if you are concerned
specifically about the case where pE < pP execs fE=full && fP=0,
but I am unconvinced this constitutes serious breakage. On the
contrary, I think it seems most reasonable for those caps to be
reenabled, especially for caps where fI=1, but perhaps even when
fI=0.

I'm still looking over your patches to try to figure out how exactly
you think this stuff should work. I'm glad to see someone out
there is thinking about this. You're right, it's pretty complex
and still far from useable.

--
Michael Glasgow < glasgow at beer dot net >
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.092 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site