All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: Eric Paris <eparis@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Daniel J Walsh <dwalsh@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	SELinux <selinux@tycho.nsa.gov>,
	Chad Hanson <chanson@TrustedCS.com>
Subject: Re: svirt on MLS has strange AVC.
Date: Tue, 30 Mar 2010 14:23:13 -0400	[thread overview]
Message-ID: <201003301423.13417.paul.moore@hp.com> (raw)
In-Reply-To: <1269959533.2941.9.camel@dhcp235-240.rdu.redhat.com>

On Tuesday 30 March 2010 10:32:13 am Eric Paris wrote:
> On Mon, 2010-03-29 at 16:00 -0400, Paul Moore wrote:
> > On Monday 29 March 2010 02:29:24 pm Eric Paris wrote:
> > > Client Process:	Client Socket:	Client Sock:		Server Sock:	
Server
> > > Socket:	Server Process: C1		C1		C1			S2		S2
> > 
> > S2
> > 
> > > [Client calls connect]					[Server call accept]
> > > [The client struct socket is relabeled]			[new child socket 
below, I
> > 
> > ignore
> > 
> > > original socket] C1		S2		C1			S2		C1		
S2
> > > 
> > > Now we have multiple types of checks wich I know off the top of my head
> > > we want to deal with, namely:  {read/write:socket} {recv:peer}
> > > {recv:packet}
> > 
> > Ungh, put me down as "not a fan".  The relabeling looks like a bit of a
> > hack and makes me nervous about race conditions, policy issues and all
> > sorts of things.  I haven't thought about it completely yet, but what
> > happens if a client wants to set a socket option after it has connected
> > to a remote host? Wouldn't that mean that you would need the following
> > allow rule?
> > 
> >  allow C1 S2:socket { setopt }
> 
> Well that's sorta what we do today with ONLY the MLS component ONLY on
> the server side of the connection.  This makes me sad.

Not really ... at least I hope we don't allow one domain to set the socket 
options of another.

> > I appreciate that you're trying to make a complex thing less so, but
> > sometimes you have to tell Dan "no".
> 
> Believe me, Dan is more surprised when I decide to argue FOR his
> harebrained schemes than when I tell him "no."   *smile*

 ;)

> > I would need to think about this a bit more, but we could have both a
> > "local_label" and a "peer_label" (I'm just picking easy, descriptive
> > names right now) on both a socket and a sock, much like the "sid" and
> > "peer_sid" labels we have now.  All traffic leaving a sock would be
> > wire-labeled based on the "local_label" and all traffic being queued to
> > a sock would be checked against the "local_label" as well.  Applications
> > trying to read and write data to and from a sock queue would be checked
> > against the "peer_label" and the rest of the socket operations,
> > create/connect/listen/setsockopt/getsockopt/etc., would use the
> > "local_label".
> 
> It's the same basic idea I was thinking of, only it looks a bit less
> like using an implementation detail and more like making sense  :)
> 
> getting rid of security_sid_mls_copy() while maintaining (or growing)
> our ability to control traffic would be a great step forward....
> 
> /me tries to find some time to play....

I know we're big fans of code first, design later around here but I think 
there are a few issues that need to be discussed a bit first (and I don't 
consider this an exhaustive list):

1. How do we label the socket's corresponding inode?

2. We would want to ensure the socket's directional labels are handled 
correctly with the SA labels, i.e. label the also directional SAs correctly 
and make sure we don't create useless SAs due to label mis-match (pretty sure 
we have this problem today, at least we did at some point).

3. Policy implications; beware that by making this change policy is going to 
get a lot more involved for TCP based network applications.

4. Is Stephen/NSA on board, in other words, what do the real security geeks 
(no offense intended) have to say about this approach?

-- 
paul moore
linux @ hp

--
This message was distributed to subscribers of the selinux mailing 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.

  parent reply	other threads:[~2010-03-30 18:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 21:44 svirt on MLS has strange AVC Daniel J Walsh
2010-03-22 23:47 ` Eric Paris
2010-03-23 11:35   ` Daniel J Walsh
2010-03-23 11:44     ` Daniel P. Berrange
2010-03-25  2:42       ` Eric Paris
2010-03-25  9:45         ` Daniel P. Berrange
2010-03-25 14:02         ` Stephen Smalley
2010-03-25 16:49           ` Paul Moore
2010-03-25 18:00             ` Daniel J Walsh
2010-03-25 18:17               ` Stephen Smalley
2010-03-25 19:02                 ` Eric Paris
2010-03-25 22:06                   ` Paul Moore
2010-03-25 22:09                     ` Daniel P. Berrange
     [not found]                     ` <1269612002.2980.69.camel@dhcp231-113.rdu.redhat.com>
2010-03-26 19:54                       ` Paul Moore
2010-03-29 17:06                     ` Eric Paris
2010-03-25 18:06             ` Stephen Smalley
2010-03-25 18:11               ` Daniel J Walsh
2010-03-25 18:19                 ` Stephen Smalley
2010-03-25 18:23                 ` Eric Paris
2010-03-25 18:34                   ` Stephen Smalley
2010-03-25 18:45                     ` Eric Paris
2010-03-25 21:36                       ` Paul Moore
     [not found]                         ` <1269610923.2980.51.camel@dhcp231-113.rdu.redhat.com>
2010-03-26 19:47                           ` Paul Moore
2010-03-29 18:29                             ` Eric Paris
2010-03-29 17:05                         ` Eric Paris
2010-03-25 18:29                 ` Eric Paris
     [not found] ` <201003291600.06024.paul.moore@hp.com>
     [not found]   ` <4BB20E8D.7030207@redhat.com>
2010-03-30 18:07     ` Paul Moore
2010-03-30 18:20       ` Eric Paris
2010-03-30 18:23         ` Daniel J Walsh
2010-03-30 18:39           ` Paul Moore
2010-03-30 18:56             ` Paul Moore
2010-03-30 19:13               ` Daniel J Walsh
2010-03-30 19:22                 ` Paul Moore
2010-03-30 19:31                   ` Daniel J Walsh
2010-03-30 19:38                     ` Stephen Smalley
     [not found]   ` <1269959533.2941.9.camel@dhcp235-240.rdu.redhat.com>
2010-03-30 18:23     ` Paul Moore [this message]
2010-03-30 19:20   ` Stephen Smalley
2010-03-30 20:17     ` Eric Paris
2010-03-30 20:23       ` Stephen Smalley
2010-03-30 20:30       ` Paul Moore

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=201003301423.13417.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=berrange@redhat.com \
    --cc=chanson@TrustedCS.com \
    --cc=dwalsh@redhat.com \
    --cc=eparis@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /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 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.