All of lore.kernel.org
 help / color / mirror / Atom feed
* SELinux & Linux-privs projects
@ 2001-01-11 14:44 Jeffry Smith
  2001-01-11 15:20 ` Stephen Smalley
  2001-01-11 15:45 ` [Linux-privs-discuss] " Christoph Hellwig
  0 siblings, 2 replies; 24+ messages in thread
From: Jeffry Smith @ 2001-01-11 14:44 UTC (permalink / raw)
  To: selinux, linux-privs-discuss

Sent to both lists
Since I hadn't seen any traffic on the two lists about the other project, I 
thought I'd cross-send a message, to ensure the two communities are aware of 
what the other is doing.  I figure, although the projects are tackling 
different parts of the security of linux, there should be some overlap, since 
privileges should make it easier to do the type enforcement (I think), and the 
type enforcement can help with requirements for privileges (right?).

Comments?  

jeff


--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [Linux-privs-discuss] SELinux & Linux-privs projects
@ 2001-01-11 23:10 Jesse Pollard
  2001-01-12 21:31 ` LA Walsh
  0 siblings, 1 reply; 24+ messages in thread
From: Jesse Pollard @ 2001-01-11 23:10 UTC (permalink / raw)
  To: hch, Stephen Smalley; +Cc: Casey Schaufler, selinux, linux-privs-discuss

Christoph Hellwig <hch@ns.caldera.de>:
> On Thu, Jan 11, 2001 at 01:31:44PM -0500, Stephen Smalley wrote:
> > > That's because those are the only operations POSIX systems
> > > support! It's implicit in being a POSIX (DRAFT) standard.
> > 
> > You can define distinct operations (permissions) in the
> > mandatory security policy for distinct kernel services
> > without altering the interfaces or behavior for discretionary
> > access controls. 
> 
> Sure you can.  But Posix 1003.1e is designed to fit nicely into
> a UNIX/Posix enviroment.  And that's exactly why I like it.
> 
> > As discussed ad nauseum on the robust open source mailing list,
> > Type Enforcement is desirable for its support for ensuring that
> > applications are unbypassable and tamperproof, that processes
> > with any sort of privileges cannot execute untrustworthy
> > code, and for providing least privilege.
> 
> For this you have capabilities.  Look at the allowed set in filesystem
> capabilities.  That's another fine part of Posix 1003.1e: it seperates
> cleanly what does not belong together.

That is true for some security policies, not for others. POSIX is/was
based on the TSEC description, which is a very black/white model. It
does not support a more complex model such as a chinese wall structure.

That policy allows a user to access anything. But once the user accesses
an isolated object, the user can no longer access other objects. This
is related to the problem of "privileged communication" and "conflict
of interest" resolution. It also has some limitations when it comes to
certain privacy controls that are beginning to show up in industry and
government.

It appears that the SELinux implementation might be able to allow such
a structure to be created, and enforced.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: [Linux-privs-discuss] SELinux & Linux-privs projects
@ 2001-01-12 23:02 Jesse Pollard
  2001-01-12 23:36 ` LA Walsh
  0 siblings, 1 reply; 24+ messages in thread
From: Jesse Pollard @ 2001-01-12 23:02 UTC (permalink / raw)
  To: law, Jesse Pollard, Stephen Smalley; +Cc: selinux, linux-privs-discuss

---------  Received message begins Here  ---------

> 
> 
> > That is true for some security policies, not for others. POSIX is/was
> > based on the TSEC description, which is a very black/white model. It
> > does not support a more complex model such as a chinese wall structure.
> ---
> 	No?  User1 wants to access the Firm-A defense file.  Runs a transition
> program that adds Firm-A to the user's mac-label division list.  Now any
> files or users that are working on Firm-B defense files (which have gone
> through the same transition to mac-label w/division "firm-b" added) are 
> inaccessible to the User1.  User1 is now permanently banned from firm-b
> files by having transitioned into a user with 'firm-a' access.
>
> 	Seems like that implements perfectly a chinese wall /conflict of
> interest model.  

Not unless every possible process suddenly becomes the "transition program".
The key here is that the user could just be running "more". If the user
has no restrictions, then it works. Once the user HAS done more on the
file, then restrictions may be imposed on the next file (depending on the
conflict). 

There is no need to run a special program before gaining access. No
intervention by the security manager other than defining the conflict matrix
in the first place.

A practical chinese wall has more complications too. A conflict is usually
specified in a contract ("propriatary information not to be divulged for
5 years" type of thing). This means that the conflict exists, but only
for the time interval since it was last imposed (most likely based on the
modification date of the file?). After the time interval, the conflict
is resolved, and the restriction removed. Even if the file is destroyed,
the conflict still remains.

Existing lattice models have no structure to handle time, they all expect
the state to last forever. This would help with the automatic downgrading
of sensitive data, if the data could be labled with time as well as
compartment/level ("not for release until after xxx hours...). These
transitions currently require intervention by the security administrator,
and the author (if available - he may have died... now the data may never
get downgraded).

> 	To my mind MAC+capabilities + a transitions config file = "domain
> or type enforcement".  I see the transitions file as being fairly easy to
> maintain.  	
> 
> 	MAC and capabilities are basic building blocks from which you can
> build other security models.
> 
> 	I'm told you can build MAC and capabilities from DTE with 
> sufficient rules, and perhaps that is so, but it seems that set of rules
> would be considerably more complex than a "transitions" file with which
> to implement DTE or Chinese Wall.

The "transitions" file has no means of detecting when enforcement must
take place. It has to be applied manually, and can't be done automatically
since the security monitor for lattice structured systems cannot interpret
it.

I grant that a DTE rule set may be more complex to define a lattice, but
the intent appears to be to provide initial definitions, and explore more
flexible definitions.

I would also imagine that they may be slower for really complex structures
too... perhaps we are seeing an analogue to the CISC/RISC cpu archetectures
from 10 years ago? Both were right, and both were wrong (and depended on the
application....)

Right now, I don't fully understand the difference in implementation, other
than the security monitor itself. It appears that the DTE can define how
the bits are interpreted. Lattice models tend to have a fixed definition of
the bits, limiting redefinition. I don't yet know if there is still a limit
on the number of bits, but perhaps that is more flexible too. 32 (or even
64) bits has always seemed too limiting. It certainly should be less
restrictive on the algorithm implemented for evaluation.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <01011220390900.30390@tabby>]
* RE: [Linux-privs-discuss] SELinux & Linux-privs projects
@ 2001-01-16 22:00 Jesse Pollard
  2001-01-17  0:30 ` LA Walsh
  0 siblings, 1 reply; 24+ messages in thread
From: Jesse Pollard @ 2001-01-16 22:00 UTC (permalink / raw)
  To: law, pollard, Jesse Pollard; +Cc: selinux, linux-privs-discuss

"LA Walsh" <law@sgi.com>:
> > > >	Can have unintended consequences if someone who has read 'defense-A'
> > >"su's" to root and writes /etc/passwd.  But you get the idea -- a lawyer
> > >on "A" couldn't be a sysadmin.  The configuration would be an
> > implementation
> > >detail, but seems "doable".
> >
> > Is doable, but not with the rigid lattice structure. There the requirement
> > is that the subject must already dominate the object before
> > access. It would
> > be possible to invoke a "transition security" as part of the security
> > server. The only limitation then is the rigid definition of what
> > the security
> > bits mean.
> ---
> 	I don't have DS17 memorized, but I don't remember reading that
> labels are rigid.  No where do I find that a 'user' has to be involved
> in a transition.  The POSIX spec seems to state that "the MAC label of a
> file
> shall be dominated by the MAC label of a subject for the subject to read the
> data
> or attributes of a file."
>
> 	I don't see that as saying the MAC label of the process is RIGID.  I.e. -
> suppose I define my domainates function as "is newer or of equal age".  A
> process
> always runs with a MAC label of 'current time'.  The MAC label on the file
> is 'last modified time'.
> 
> 	So under File Policy 1, p197, the current time (MAC label of the process)
> must be 'newer or equal' to the last-mod time on a file.
> 	Under FP2 & 4: the 'last-mod' time must dominate, so a write or create
> would set it to "equal" age (note that items of equal age dominate each
> other).
> 
> 	This is definintely not RIGID or lattice but does seem meet the POSIX
> requirements or am I reading something wrong?

1. You are now using bits that are not under MAC control.

2. The date being shown cannot be used as part of an access policy (changed
   by the user/group). That would call for another field to contain the
   the real "last-mod" date, which could ONLY be changed by the OS+FS.

The "rigid" here means what can be stored in the label. Usually
this is limited to "level" access and/or a "compartment" mask. The ability to
change the label to include time does not exist, especially since the
owner can change the date and invalidate its use as a label.

> 	Assuming my interpretation is valid, it seems that dynamically
> altering the MAC-label of a Subject Process such that it dominates an
> object to be read would still would still be a conforming DS17
> implementation.

Subject altering is possible as long as the "MAC_UPGRADE" is permitted first.

> >
> > Not really - it only prevents downward flow. For compartmentalization the
> > user must first be an active member of the compartment, rather
> > than assuming
> > the compartment of the data if there are no conflicts. The
> > "information label"
> > only proves that the user is allowed. Not that the user may be
> > "conditionally"
> > allowed as long as there are no conflicts.
> ---
> 	Again, while it talks about the need for a user to possess
> CAP_MAC_UPGRADE to upgrade their own MAC label at *their* request, I
> don't see anything that prohibits the OS from doing this automatically
> based on some set of rules.

I don't believe an action is defined to allow a dynamic upgrade, the security
server would have to be the one doing the upgrade - and that would work though
now the security server is no longer matching the POSIX definition of providing

"The information label interfaces specified support the following functions: 

     test information label relationship - includes interfaces that will determine
		dominance between two labels, and equivalence between two labels. 
     float a label - includes an interface that will produce a label that is the
		combination of a label associated with a source, and the label
		associated with a destination. This new label will then be
		associated with the destination. 
     label validity - includes an interface for determining whether an information
		label is valid. The definition of a valid information label is
		implementation defined; however, examples include: the label is
		malformed, the label contains components that are not currently
		defined on the system, or the label is simply forbidden to be dealt
		with by the system. "

from "http://csrc.nist.gov/nistpubs/800-7/node17.html" POSIX Security Interfaces
and Mechanisms.

It doesn't appear to prevent additional functions though that would be extending
the POSIX interface. I do note that the "float a label" does not include the
subject.

> 
> > Rather than have two trusted programs that can change each field
> > separately,
> > it would be better to allow one program to request permission (gain the
> > appropriate lable) to change either field. That requires the flexibility
> > to have more security bits controlled by the server than are currently
> > available.
> ---
> 	That's not within the scope of the POSIX spec.  It seems you are
> requesting 'more bits' that "applications" could use as they see fit
> that are managed by the OS.  I don't see this as some lack with the POSIX
> security features as much as simply an implementation-dependent detail.
> Linux could choose to provide more bits to user-apps.  Choosing to do
> so or not is independent of the discussion concerning the merits of a
> DS17 conforming implmentation vs. a DTE system.

True, but it doesn't eliminate the need though, it just eliminates the
ability to implement it. (I have a LOT more to study before this statement
has any real assurance of correctness. I could be all wet here.)

I do have to go find that DS 16 document since I already know that
DS 17 has never been made public information (to my knowlege). I understand
that the differences were for clarification only, though.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: [Linux-privs-discuss] SELinux & Linux-privs projects
@ 2001-01-17 15:22 Jesse Pollard
  0 siblings, 0 replies; 24+ messages in thread
From: Jesse Pollard @ 2001-01-17 15:22 UTC (permalink / raw)
  To: law, Jesse Pollard, pollard; +Cc: selinux, linux-privs-discuss

I'll leave the other parts... I'm not fully familiar yet with DS16/17
and it is beginning to feel like we are discussing the differences
between macintosh apples and granny smith... (the representation of
the controls vs the representation of the policy limits -
It feels like I'm coming round to your thoughts too..)

> > > > That requires the  flexibility
> > > > to have more security bits controlled by the server than are currently
> > > > available.
> > > ---
> > > 	That's not within the scope of the POSIX spec.  It seems you are
> > > requesting 'more bits' that "applications" could use as they see fit
> > > that are managed by the OS.  I don't see this as some lack with
> > the POSIX
> > > security features as much as simply an implementation-dependent detail.
> > > Linux could choose to provide more bits to user-apps.  Choosing to do
> > > so or not is independent of the discussion concerning the merits of a
> > > DS17 conforming implmentation vs. a DTE system.
> >
> > True, but it doesn't eliminate the need though, it just eliminates the
> > ability to implement it. (I have a LOT more to study before this statement
> > has any real assurance of correctness. I could be all wet here.)
> ---
> 	The 'need' is dependent on the type of security policy you wish
> to implement in a system.  Indeed, I'd tend to agree, in a complete
> security-distribution, files that are in the "Trusted Base" or TCB, but that
> are not in the kernel may want capabilities.  The problem is one of
> "enforcement".  The kernel cannot enforce the minutia of which field in
> a database is writeable by a user.  That layer of "abstraction" is normally
> provided in an application that ensures conformity.
> 
> 	The alternative would be a kernel that, for example, could parse
> the passwd file and decide if an access was allowed or not.  Is it good
> design for the kernel to manage bits that it doesn't enforce?  Maybe it
> is convenient -- but once the usage monitoring leaves the kernel, those
> bits are essentially 'user data' to the kernel (even though they may be
> part of 'system software' in a TCB).

The kernel is the conduit of sensitive data. I think it will become
likely that the security data will be supported by a database server
at some time in the future - a password server. It would be usefull
to be able to have that daemon provide/accept data via the kernel interface
(and libc) for things like "getpwent". I think it likely that there should
be some symetry with a "modpwent" and "putpwent" (or "newpwent").

The restrictions on access to the data must be defined by something, and
I think that something is best served by the security monitor. Storage of
the data is better served by the database, as controled by the security server.
Especially since the security server already implements the functions that
can evaluate the policy being defined. The data flow for this is

1: user process <---> kernel interface <---> security monitor <---> logindb

or

2: user process <---> kernel interface <---> security monitor
                               \
                                +--> logindb

or even (though more work has to be done by the logindb and the
  	security monitor):

3: user process <---> kernel interface <---> logindb <---> security monitor

That way the security monitor determines what gets passed to the logindb.
I think just a "yes/no" decision should be sufficient, yes the data is passed
no, the data is not. The advantage is the elimination of passwd as a trusted
program, NIS as a trusted facility, and the password and shadow files as a
trusted disk file (though the equivalent may be present as part of the logindb
storage structure). It may possibly reduce the support complications of
various authentication daemons, since currently, each must be trusted to
handle security data safely. the authentication daemons only have to match
password/kerberos/... and not have to deal with accessing the passwd and
shadow files.

I would prefer 1 or 2 over 3 because it feels like a better and more auditable
operation. The logindb doesn't have to be trusted for anything but proper
storage/retrieval of the data. #3 also depends on logindb having access to
the user process credentials, and passing those same credentials for
evaluation by the security monitor, AND respecting the result of the decision.

And I prefer #1 over #2 for similar reasons, plus it starts defining a
series of interface definitions for other security database interfaces
(IPSec SAD for one, a generic authentication daemon for another, security
configuration control, policy database, audit event log, ...)

Much better than having two different security monitors that may make
conflicting decisions.

I haven't tried to implement it though...

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2001-01-23 16:37 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-11 14:44 SELinux & Linux-privs projects Jeffry Smith
2001-01-11 15:20 ` Stephen Smalley
2001-01-11 16:41   ` Huagang Xie
2001-01-11 16:46     ` [Linux-privs-discuss] " Christoph Hellwig
2001-01-11 15:45 ` [Linux-privs-discuss] " Christoph Hellwig
2001-01-11 16:04   ` Stephen Smalley
2001-01-11 16:16     ` Christoph Hellwig
2001-01-11 16:48       ` Stephen Smalley
2001-01-11 17:35         ` Casey Schaufler
2001-01-11 18:31           ` Stephen Smalley
2001-01-11 18:56             ` (offtopic) " Andrew Morgan
2001-01-11 18:59             ` Christoph Hellwig
2001-01-11 20:54               ` Stephen Smalley
2001-01-12  0:25             ` [Linux-privs-discuss] " Casey Schaufler
2001-01-11 16:59       ` Stephen Smalley
2001-01-23 16:13         ` Robert Watson
  -- strict thread matches above, loose matches on Subject: below --
2001-01-11 23:10 Jesse Pollard
2001-01-12 21:31 ` LA Walsh
2001-01-12 23:02 Jesse Pollard
2001-01-12 23:36 ` LA Walsh
     [not found] <01011220390900.30390@tabby>
2001-01-16 20:15 ` LA Walsh
2001-01-16 22:00 Jesse Pollard
2001-01-17  0:30 ` LA Walsh
2001-01-17 15:22 Jesse Pollard

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.