<html>
<body>
At 08:17 AM 8/31/2008, Toby Murray wrote:<br>
<blockquote type=cite class=cite cite="">On Sun, 2008-08-31 at 07:37
-0700, Sandro Magi wrote:<br>
&gt; Note that securable ACL systems and their relationships with
capabilities has been discussed many times before on cap-talk, in
particular as applies to systems with private namespaces. Eric Raymond
started a discussion in 2002 which is similar to what Shap proposes
below, regarding namespaces and Plan 9 [1]. The whole thread is
interesting, as it hashes out many problems with UNIX semantics and
private namespaces.<br><br>
I tend to view the Unestos design from [1] as an idealised marriage
of<br>
UNIX and a capability-based OS that provides strong POLA support
whilst<br>
being recognisable to all those familiar with UNIX.<br><br>
[1]<br>
<a href="http://www.usenix.org/event/hotos05/final_papers/full_papers/krohn/krohn.pdf" eudora="autourl">
http://www.usenix.org/event/hotos05/final_papers/full_papers/krohn/krohn.pdf</a>
</blockquote><br>
I found this paper interesting enough that I'll share some notes from
reading (sequential and loosely edited - be forewarned):<br><br>
1.&nbsp; &quot;A first approximation of a POLP-friendly system is one
based on capabilities, discussed in Section 3. Though capabilities have
historically flummoxed application designers, we present a more familiar
interface, based on the Unix file system.&quot;<br><br>
Is there any evidence that 'capabilities have flummoxed application
designers'?&nbsp; I don't recall reading any papers where application
designers complained about the capability interface.&nbsp; Do
others?&nbsp; I would be very interested to see such complaints (issues,
etc.) as any such would cut into my argument that the main difficulty
expressed with the use of capability systems has been the &quot;loose
capabilities&quot; problem (I may have forgotten the agreed upon name for
this problem - reminder?).<br><br>
At this point they mention weaknesses in the capability design:<br><br>
&quot;In Section 4, we discuss shortcomings in this proposed
design:<br><br>
A.&nbsp; system weaknesses might still allow vulnerabilities to spread,
(loose capabilities), and<br><br>
B.&nbsp; process-sized compartments are too coarse grained.&nbsp;
(seemingly a performance issue which I would say is addressed by ocap
languages)<br><br>
<br>
2.&nbsp; Here is a quote I found amusing: &quot;System administrators
with enough patience and expertise can chroot or jail standard servers
such as Apache [1], BIND [3] and sendmail [26], though the process
resembles stuffing an elephant into a taxicab.&quot;<br><br>
Amen to that!&nbsp; I agree with their criticisms of this approach.&nbsp;
Particularly nasty are problems like they discuss with their OK Web
Server such as: &quot;The chown call in Step 5, the chroot call in Step
6, and the setuid call in Step 7 all require privileged system access,
<b>so the launcher must run as root</b>.&quot;<br><br>
<br>
3.&nbsp; Particularly damning of POLP efforts in modern operating systems
is their comment:<br><br>
&quot;Other systems use similar techniques to solve related problems.
Examples include remote execution utilities such as OpenSSH [23] and REX
[10], and mail transfer agents such as qmail [2] and postfix [21].
Considering these applications and others, a trend emerges: in each
instance, the intricate mechanics of privilege separation are invented
anew. To audit the exact security procedures of these applications, one
must comb tens of thousands of lines of code, each time learning a new
system. Even automated tools that separate privileged operations [5]
require root access.&quot;<br><br>
I agree with this criticism.&nbsp; Others?<br><br>
<br>
4.&nbsp; Nice to see the Polaris reference [30]<br><br>
<br>
5.&nbsp; The section &quot;Unix as a Capability System&quot; I found
interesting.&nbsp; Particularly their use of the term
&quot;virtualizable.&quot;&nbsp; I don't believe I've ever heard that
term used in that form before.&nbsp; There they say,<br><br>
&quot;Processes are usually indifferent to whether a file descriptor is a
regular file, a pipe to another process, or a TCP socket, since the same
read and write calls work in all three cases. In practical terms,
virtualization simplifies POLP-based application design.&quot;<br><br>
Is the term &quot;virtualization&quot; often (usually) used with the
above meaning.&nbsp; I don't know of a better term, but virtualization
seems so heavily overloaded that I would hope for a better term.&nbsp;
Shortly after the above the paper says,<br><br>
&quot;...virtualizable system calls enable interposition.&nbsp; If an
untrustworthy process asks for a sensitive<br>
capability, a skeptical operator can babysit it by handing it a pipe to
an interposer instead.&quot;<br><br>
If that is what they mean by &quot;virtualization&quot; I consider that a
different phenomenon.&nbsp; That is what I've heard termed the
&quot;insertion&quot; property, e.g. from:<br><br>
F. A. Akkoyunlu, K.Ekanadham, R. V. Huber, &quot;Some Constraints and
Tradeoffs in the Design of Network Communications,&quot; Proceedings of
the Fifth Symposium on Operating System Principles, 1975, Vol. 9, No. 5,
pp. 67-74.<br><br>
Terminology corrections gratefully accepted.<br><br>
<br>
6.&nbsp; This section of the paper under 3.2 &quot;Naming and Managing
Capabilities&quot; puzzles me somewhat:<br><br>
&quot;...Traditional capability systems such as EROS favor global,
persistent naming, but persistence has proven cumbersome to kernel and
application designers [27].&quot;<br><br>
Is the above true?&nbsp; Isn't it the persistence of active elements
(processes, active objects) that have proves &quot;cumbersome&quot;
(actually a tradeoff)?&nbsp; I haven't heard of any cumbersome aspects of
persistent naming of objects.&nbsp; They continue:<br><br>
&quot;Instead, we advocate a per-process, Unix-style namespace. Under
Unestos, P1 makes capabilities available to P2 as files in P2’s
namespace. Suppose P1’s namespace contains a tree of files and
directories under /secret, and P1 wishes to grant P2 access to files
under /secret/bob. As in Plan 9 [20], P1 can mount /secret/bob as the
directory /home in P2’s namespace.&nbsp; Unlike in Plan 9, the state
implicit in the perprocess namespace is handled at user level, and the
kernel only traffics in messages sent to capabilities. For example, when
the process P2 opens a file under /home, the user level libraries
translate the directory /home to some capability C.&nbsp; The kernel sees
a LOOKUP message on C.&quot;<br><br>
I don't understand what is going on in the above.&nbsp; Are they
advocating that the kernel support separate Unix-style name spaces for
each process?&nbsp; When they suggest that P1 'mount' /secret/bob as the
directory /home in P2's name space it seems to me they are overreaching a
bit.&nbsp; Why should P1 control names in P2's environment.&nbsp; To me
it seems more effective for P1 to simply send a &quot;capability&quot; to
/secret/bob to P2.&nbsp; P2 can &quot;mount&quot; it anywhere it
wishes.&nbsp; The modularity is preserved while allowing P2 to manage
it's own name space (except within /secret/bob - wherever that is based
in P2's name space).<br><br>
<br>
7.&nbsp; Regarding 3.3 &quot;OKWS Under Unestos&quot;, it seems to me
that OKWS under a simple OCap system is even simpler.<br><br>
<br>
8.&nbsp; Regarding &quot;4 FINE-GRAINED POLP WITH MAC&quot;:&nbsp; The
start with this somewhat enigmatic statement:<br><br>
&quot;Applications in Unestos can only express security policies in terms
of processes, but processes often access many different types of data on
behalf of different users. A security policy based on processes alone can
therefore conflate data flows that ought to be handled
separately.&quot;<br><br>
This is the first place where I've seen the notion of a &quot;user&quot;
(seemingly a person) introduced.&nbsp; They seem to be suggesting that
&quot;user&quot;'s own processes, so that it's impossible to have a
process acting on behalf of multiple users, because (I'm guessing) the
owner of the process would have access to everything the process does -
including that which should belong to other users.<br><br>
<br>
9.&nbsp; &quot;This section extends Unestos to a new system, Asbestos,
whose kernel uses flexible mandatory access control primitives to enforce
richer end-to-end security policies.&quot;&nbsp; Sounds exciting.&nbsp;
I'm skeptical, but still exciting.<br><br>
<br>
10.&nbsp; Regarding, &quot;4.1 Complete Isolation -&nbsp; One possible
approach to better isolation, which we call complete isolation, is to
prohibit server-side processes from speaking for multiple
users.&quot;<br><br>
Their notion of &quot;users&quot; and the 'speak for' relation is
puzzling to me.&nbsp; I don't think I understand what they mean.&nbsp; Do
others?&nbsp; For me (in a stictly capability sense) a &quot;user&quot;
is a person interacting with a system (e.g. with a keyboard, mouse,
through a communication channel, etc.).&nbsp;&nbsp; In the paper these
authors seem to be using the term &quot;user&quot; and the 'speak for'
relation in a more internalized implementation sense (e.g. as with Unix
processes being owned by users).&nbsp; Unfortunately, as they try to
separate active entities (continuing to call the &quot;processes&quot;)
that run programs with POLA the internal implementation of
&quot;user&quot; that Unix uses gets in the way.&nbsp; Is that what they
are concerned about?<br><br>
<br>
11.&nbsp; Later in 4.1, &quot;With each additional process that speaks on
behalf of multiple users comes additional access control checks. If
application programmers forget or misapply any of these checks, the
system can leak sensitive data to attackers.&quot; - They are having
'application programmers' do their own access control checks to insure
that no sensitive data is leaked to attackers?&nbsp; Isn't the problem
that POLA tries to address the concern that it is the &quot;application
program&quot; (controlled by an attacker) that is the concern.&nbsp; I'm
afraid I'm also lost here a bit.<br><br>
<br>
12.&nbsp; Regarding: &quot;...compartments apply at the fine-grained
level of individual memory pages, so that a single process can act on
behalf of mutually distrustful users without fear of leaking data among
them.&quot; !!?!&nbsp; Further: &quot;If the sub-process errantly
accesses data in V’s compartment, the read or write will fail, since U
and V occupy incomparable compartments.&quot;&nbsp; I don't understand
how the proposed &quot;sub-process&quot; mechanism works.&nbsp;
Sub-processes apparently share parts of their memory space with other
&quot;sub-processes&quot;, but I don't understand how the lattice
mechanism is enforced.<br><br>
<br>
13.&nbsp; &quot;...since demux created the user compartments, it can
sanction trusted declassifiers to traverse them.&quot;&nbsp; Woo
hoo!&nbsp; Who controls &quot;demux&quot;?&nbsp; This is still considered
&quot;MAC&quot;??<br><br>
<br>
14.&nbsp; From the &quot;related work&quot; section:&nbsp; &quot;...ports
in microkernel systems are coarse as capabilities go; for instance, a
process can have a capability for the file server but not for a
particular directory.&quot;&nbsp; (or file presumably).&nbsp; I guess I
can accept this statement for many of the Ports discussions.&nbsp; To me
Ports always seemed like capabilities that couldn't distinguish between
objects within a single server.&nbsp; E.g. capabilities with no data to
distinguish entries into a single server.&nbsp; Why would anybody want to
so limit their &quot;capabilities&quot; to &quot;ports&quot; when the
loss is so costly and adding the additional information would be so
trivial?<br><br>
<br>
15.&nbsp; A general comment about the paper at this point:&nbsp; It seems
to be using the term MAC for what we refer to as
&quot;confinement&quot;.&nbsp; The distinction is that in a capability
system that supports confinement if process (active object) A has a
communication channel to process B in the form of a capability and A has
a communication channel to C in the form of a capability then A can send
C to B.&nbsp; My understanding if MAC is that it disallows such
communication.&nbsp; When they refer to MAC in this paper do they refer
to what we mean by MAC (beyond confinement, not allowing communication of
capabilities through channels allowed by the confinement mechanism) or do
they mean what we mean by confinement?<br><br>
<br>
Conclusion:<br><br>
It would be really great to get a bunch of these folks into a room with a
bunch of us (e.g. the HP Friday meetings) and a white board.&nbsp; It may
be just my ignorance of their terminology and background, but to me it
seems that there are a bunch of issues that are being discussed at cross
purposes, partly because of terminology differences (e.g. MAC and
confinement, &quot;virtualization&quot; vs. insertion, the notion of a
&quot;user&quot;, etc. - as discussed above).&nbsp; I think it would be
terrific if we could get people interested in these topics together in a
room, hash out the issues, and write up a set of notes that could be
referenced for future papers on these topics (mostly POLA).&nbsp; The
current fragmentation seems sad and counterproductive to me.<br><br>
Think there's any chance?<br>
<x-sigsep><p></x-sigsep>
--Jed&nbsp;
<a href="http://www.webstart.com/jed-signature.html" eudora="autourl">
http://www.webstart.com/jed-signature.html</a></body>
</html>