All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	selinux@tycho.nsa.gov, Chad Hanson <chanson@TrustedCS.com>,
	Darrel Goeddel <DGoeddel@TrustedCS.com>,
	dwalsh@redhat.com, jmorris@redhat.com, latten@austin.ibm.com,
	Paul Moore <paul.moore@hp.com>,
	Joshua Brindle <jbrindle@tresys.com>
Subject: RE: Labeled networking packets
Date: Mon, 25 Sep 2006 10:59:26 -0400	[thread overview]
Message-ID: <1159196366.3450.13.camel@localhost.localdomain> (raw)
In-Reply-To: <36282A1733C57546BE392885C0618592015735C9@chaos.tcs.tcs-sec.com>

On Fri, 2006-09-22 at 17:55 -0400, Venkat Yekkirala wrote: 
> > On Fri, 2006-09-22 at 13:23 -0400, Venkat Yekkirala wrote:
> > > OK, here's what we will do:
> > > 
> > > 1. We will have getpeercon() fail if there's no labeled-SA.
> > > 
> > > 2. We will do a getdatacon() or something similar to retrieve the
> > >    secmark (as reconciled in the proposed reconciliation 
> > logic, of course).
> > > 
> > > Comments?
> > 
> > I think that just moves the problem.
> 
> We put a design doc out 3 months or so back (alerting selinux list
> at least 2 times 
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115136637800361&w=2),
> thought got the buy in, and went ahead and implemented
> it.
> 

I've been loosely following this, but had not looked closely until two
weeks ago when we tried to sit down and figure out how we were going to
use all of this new stuff to accomplish our goals.

I know it is frustrating to get delayed feedback, but I hope that it
will ultimately result in something better.

> What baffles me is that people even had problems using secmark as it
> currently exists, just a few days back. It tells me people look at what
> has come along, and THEN find (lack of) uses for it.
> 
> Let's go back to the drawing board, first of all define the problems
> we are trying to solve, and come up with a design.

Thinking about this over the weekend, it seems to me that we are still
talking around the problem a bit. We essentially have 2 goals:

    1) Packet labeling - assigning labels to the _data_ transferred
       over the network. Secmark does only this and - from what I can 
       tell - this has been the primary motivation for Netlabel and 
       ipsec.

    2) Domain (process) context transmission - essentially, making 
       getpeercon work for non-local sockets. The important thing here 
       is that this is separate and distinct from the label of the 
       packet. getpeercon (which is not just a poorly named function - 
       the semantic is intentional and useful) should return the full 
       context of the process on the other end of the network 
       connection.

There have been various suggestions about how to reconcile these two
goals, essentially via encoding additional data via range and type
transitions. I believe that this _will never work_. It is not possible
to recover the domain context fully from the packet label - if nothing
else the user and role will be lost (e.g., a data label would likely use
object_r), which is unacceptable for the imagined uses of getpeercon.

The choices I see are:

    1) Leave netlabel and ipsec as packet labeling _only_. Somehow 
       reconcile / prioritize the various packet labels.

    2) Make netlabel and ipsec transmit the sending domain context 
       _only_. Somehow reconcile the various domain labels.

    3) Allow ipsec to transmit 2 contexts or designate that Netlabel 
       passes 1 kind of remote label and ipsec transmits the other 
       (e.g., netlabel labels the packet while ipsec transmits the 
       sending domain context).

The primary drawbacks I see to 1 are that getpeercon will not work for
remote sockets and the current reconciliation schemes require divergent
policies depending upon the labeling mechanisms employed.

The problem with 2 is that it doesn't allow the sending machine to pass
information that it has about the label of the packet - this is probably
a large loss for MLS, but is also problematic for TE (e.g., my bind
example - only bind knows whether a packet is part of a zone transfer or
not).

3 is the most flexible but is probably the most complicated. It also
probably requires the most rewriting.

Just a general note - I think that multiple packet labeling mechanisms
cooperating is going to be difficult for users to understand and debug -
if we get users used to writing secmark rules with iptables it will be
surprising if those simply stop working for hosts that use labeled ipsec
(which is the current default). The notion that we need to have multiple
policies is going to make things difficult for distributors and users
(and is an unacceptable solution in my view). I think we need to focus
more on what the resulting policies will look like and what the
writing / debugging /setup process will look like for users.

Thanks,

Karl




--
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:[~2006-09-25 14:59 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-22 21:55 Labeled networking packets Venkat Yekkirala
2006-09-23 14:13 ` Joshua Brindle
2006-09-25 15:35   ` Stephen Smalley
2006-09-25 15:55     ` Joshua Brindle
2006-09-25 16:43       ` Darrel Goeddel
2006-09-25 17:02       ` Stephen Smalley
2006-09-25 18:14         ` Karl MacMillan
2006-09-25 19:58           ` James Morris
2006-09-25 16:35     ` Karl MacMillan
2006-09-25 18:04       ` Stephen Smalley
2006-09-25 18:25         ` Joshua Brindle
2006-09-25 18:41           ` Karl MacMillan
2006-09-25 18:53             ` Joshua Brindle
2006-09-25 19:00             ` Paul Moore
2006-09-25 19:25               ` Stephen Smalley
2006-09-25 19:38                 ` Paul Moore
2006-09-25 19:56                   ` Stephen Smalley
2006-09-25 18:49           ` Stephen Smalley
2006-09-25 19:21             ` Stephen Smalley
2006-09-25 14:59 ` Karl MacMillan [this message]
2006-09-25 17:58   ` Stephen Smalley
2006-09-25 18:38     ` Karl MacMillan
2006-09-25 18:54       ` Paul Moore
2006-09-25 20:04     ` James Morris
2006-09-25 20:54       ` James Morris
  -- strict thread matches above, loose matches on Subject: below --
2006-09-27 19:35 Venkat Yekkirala
2006-09-27 19:15 Joy Latten
2006-09-27 16:46 Venkat Yekkirala
2006-09-27 16:14 Joy Latten
2006-09-26 22:04 Venkat Yekkirala
2006-09-26 22:43 ` James Morris
2006-09-27 11:37   ` Stephen Smalley
2006-09-27 12:40     ` Joshua Brindle
2006-09-27 12:58       ` Stephen Smalley
2006-09-27 13:15         ` Joshua Brindle
2006-09-27 12:59     ` James Morris
2006-09-27 13:29       ` Stephen Smalley
2006-09-27 17:03         ` James Morris
2006-09-27 17:08         ` James Morris
2006-09-26 15:58 Venkat Yekkirala
2006-09-26 15:51 Venkat Yekkirala
2006-09-26 16:47 ` Stephen Smalley
2006-09-26 20:01 ` James Morris
2006-09-25 21:53 Venkat Yekkirala
2006-09-25 22:00 ` James Morris
2006-09-25 21:46 Venkat Yekkirala
2006-09-26 13:35 ` Stephen Smalley
2006-09-25 20:02 Chad Hanson
2006-09-25 20:47 ` Stephen Smalley
2006-09-25 18:56 Chad Hanson
2006-09-25 19:24 ` Stephen Smalley
2006-09-25 15:28 Chad Hanson
2006-09-25 16:41 ` Karl MacMillan
2006-09-25 18:00 ` Stephen Smalley
2006-09-25 14:45 Chad Hanson
2006-09-25 15:54 ` Casey Schaufler
2006-09-22 23:39 Joy Latten
2006-09-22 23:25 Joy Latten
2006-09-22 21:42 Venkat Yekkirala
2006-09-22 20:30 Venkat Yekkirala
2006-09-22 17:23 Venkat Yekkirala
2006-09-22 17:47 ` Paul Moore
2006-09-22 20:44   ` James Morris
2006-09-22 21:07     ` Paul Moore
2006-09-22 18:52 ` Joshua Brindle
2006-09-22 20:45   ` James Morris
2006-09-22 20:57 ` Stephen Smalley
2006-09-25 14:30   ` Karl MacMillan
2006-09-22 16:14 Venkat Yekkirala
2006-09-22 16:05 Venkat Yekkirala
2006-09-22 16:21 ` Paul Moore
2006-09-22 15:56 Venkat Yekkirala
2006-09-22 16:20 ` Paul Moore
2006-09-22 15:45 Venkat Yekkirala
2006-09-22 16:07 ` Paul Moore
2006-09-22 15:41 Venkat Yekkirala
2006-09-22 15:55 ` Paul Moore
2006-09-22 15:36 Venkat Yekkirala
2006-09-22 15:50 ` Paul Moore
2006-09-22 15:21 Venkat Yekkirala
2006-09-22 15:38 ` Joshua Brindle
2006-09-22 15:15 Venkat Yekkirala
2006-09-22 15:30 ` Paul Moore
2006-09-22 15:09 Venkat Yekkirala
2006-09-22 14:57 Venkat Yekkirala
2006-09-22  0:44 Venkat Yekkirala
2006-09-22  2:04 ` Joshua Brindle
2006-09-22 12:47   ` Stephen Smalley
2006-09-22 13:02     ` Joshua Brindle
2006-09-22 14:47       ` Paul Moore
2006-09-22 14:58         ` Joshua Brindle
2006-09-22 15:25           ` Paul Moore
2006-09-22 19:48             ` James Morris
2006-09-22 19:49           ` Stephen Smalley
2006-09-22 19:02       ` Stephen Smalley
2006-09-22 13:26     ` Karl MacMillan
2006-09-22 13:50       ` Joshua Brindle
2006-09-22 15:01         ` James Morris
2006-09-22 19:17         ` Stephen Smalley
2006-09-22 19:07       ` Stephen Smalley
2006-09-21 17:14 Venkat Yekkirala
2006-09-21 19:37 ` Karl MacMillan
2006-09-21 16:27 Venkat Yekkirala
2006-09-21 16:47 ` Karl MacMillan
2006-09-21 15:01 Venkat Yekkirala
2006-09-21 15:55 ` Stephen Smalley

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=1159196366.3450.13.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=DGoeddel@TrustedCS.com \
    --cc=chanson@TrustedCS.com \
    --cc=dwalsh@redhat.com \
    --cc=jbrindle@tresys.com \
    --cc=jmorris@redhat.com \
    --cc=latten@austin.ibm.com \
    --cc=paul.moore@hp.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=vyekkirala@TrustedCS.com \
    /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.