From: Darrel Goeddel <DGoeddel@TrustedCS.com>
To: Paul Moore <paul.moore@hp.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
selinux@tycho.nsa.gov, kaigai@ak.jp.nec.com, joe@nall.com,
James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>
Subject: Re: [RFC 0/5] Static/fallback external labels for NetLabel
Date: Thu, 9 Aug 2007 18:55:53 -0400 [thread overview]
Message-ID: <46BB9B79.2070602@trustedcs.com> (raw)
In-Reply-To: <200708091053.33776.paul.moore@hp.com>
Paul Moore wrote:
> On Thursday 09 August 2007 10:09:14 am Darrel Goeddel wrote:
>> Because of the position I am in (needing to find something workable for
>> actual
>> users), I have been trying to get my head aounrd the state of SELinux
>> networking,
>> the ideas that have been talked about in the past, and how we can prevent
>> the
>> SELinux networking infrastructure from resembling a Rube-Goldberg
machine.
>> I'll
>> be presenting some of the problems I perceive along with some very high
>> level
>> ideas early next week.
>
> Such a tease! ;)
Here's a general high-level idea. Remember that this is in no way a
proposal
(yet) because I'm not even sure if it makes sense. It is a very simple
idea,
but it should prove to be flexible enough to handle everything. I make no
claims as to its workability, or it implementability given the fact that we
should offer some kind of backwards compatibility. I think this would be
something that one might come up with if they were starting from scratch (I
seriously doubt that the current mechanisms would ever come out of an
intentional up-front design). It is just a vision of my perfect scenario
(perfect until I figure out that it doesn't do what I need it to do)...
Please try to look at this from a clean slate as well as a retrofit
point-of-view.
picture here: http://home.insightbb.com/~dgoeddel/networking/simple.png
(when commenting, please refrain from belittling my artistic skills)
The high level ideas are (I'll be using sid and context interchangeably,
but I think we can all figure that one out):
- The secmark (lowercase, denoting the secmark field in the skb) will
always contain the peer's context. The secmark will begin life as the
unlabeled sid - we don't know who we are dealing with yet. If the
SECMARK (uppercase denoting the SECMARK iptables module) facility find
a match for the skb, we will replace the secmark with the context
specified by the matching rule - this is the fallback label, our best
guess as to who we are dealing with. In the event of the peer supplying
context information (complete context via ipsec, mls level via cipso,
or type information via carrier pigeon), the peer supplied context
information will be evaluated and verified for some sort of consistency
if there is more than one source of information. If the context created
with consideration of all peer supplied info checks out, that will then
replace the current secmark value. That's it for secmark - we now have
the best idea of who the peer really is in there.
- OK, one more bit about what is in secmark. For locally generated
traffic, it is the domain of the process, err... socket. Still the
peer context, just from a real reliable source.
- The secmark, and nothing else, will be used for all flow control checks
as well as the access check at consumption (process reading from the
socket). This means that policy represents who we can talk to, not
what association we can use, or what socket we can recvfrom, or what
internal label we can read from. Yes, secmark does it all - yeah :)
- A new SECFILTER iptables module is in place to perform flow control
checks. Just as we have used the expressiveness (either fine grained
or coarse grained - your choice) of iptables to define fallback labels
for packets based on their attributes, we want to be able to define
access check based on those attributes. It is here where we can say
that only http_client_t can get to port 80 on this machine, or that
only a secret packet can leave the machine through the eth1 device.
The SECFILTER mechanism will be able to distinguish controls for
incoming, outgoing, and forwarded traffic. In the absence of a
matching "target context" from SECFILTER, the secmark will be checked
against the unlabeled context (no SECFILTER - no label).
- Since the secmark for locally generated traffic is the context of
the sender and that is preserved as the packet gets bounced back up
to the local peer, we have labeled localhost. We can even put flow
control checks on that to boot!
- getpeeron() will return the value of secmark. This will be the same
context that was actually used by the access check and it is the same
context that considered locally defined fallbacks as well as peer
supplied information.
so, I think these ideas would:
- provide flow control
- enable loopback labeling
- provide one label instead of three possibly conflicting labels for an
skb
- streamline, simplify, make sense of access checks regarding skbs
- simplify understanding of what the skb context is - the peer's context
- enable a more reliable, safe, and informative getpeercon result
I'm not sure that any of these ideas are particularly new, but I'm
hoping that this particular combination of previously presented ideas
makes a bit of sense. I'm sure that I will get tons of useful commentary
to incorporate, and I thank you in advance :) That's why I wanted to
toss something out there now.
I'm off for a weekend trip, so please don't feel that I am ignoring all
of the scathing criticisms that will be coming tomorrow... I'll ignore
all of that next week when I return ;)
We'll be working through some prototypes to make sure that the ideas
that we present are at least somewhat feasible - unlike the blue sky
idea presented here (although that'll get prototyped to see if it is
workable - I hope it is).
--
Darrel
--
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.
next prev parent reply other threads:[~2007-08-09 22:55 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-07 14:14 [RFC 0/5] Static/fallback external labels for NetLabel Paul Moore
2007-08-07 14:14 ` [RFC 1/5] SELinux: add secctx_to_secid() LSM hook Paul Moore
2007-08-07 14:14 ` [RFC 2/5] NetLabel: Add secid token support to the NetLabel secattr struct Paul Moore
2007-08-07 14:14 ` [RFC 3/5] NetLabel: add IP address family information to the netlbl_skbuff_getattr() function Paul Moore
2007-08-07 14:14 ` [RFC 4/5] NetLabel: introduce static network labels for unlabeled connections Paul Moore
2007-08-07 14:14 ` [RFC 5/5] NetLabel: add auditing to the static labeling mechanism Paul Moore
2007-08-09 10:57 ` [RFC 0/5] Static/fallback external labels for NetLabel KaiGai Kohei
2007-08-09 11:48 ` Paul Moore
2007-08-09 12:42 ` Stephen Smalley
2007-08-09 13:29 ` Paul Moore
2007-08-09 13:54 ` Stephen Smalley
2007-08-09 14:48 ` Paul Moore
2007-08-09 15:49 ` James Morris
2007-08-09 16:01 ` Stephen Smalley
2007-08-09 22:35 ` Paul Moore
2007-08-09 13:59 ` James Morris
2007-08-09 14:50 ` Paul Moore
2007-08-09 15:13 ` Stephen Smalley
2007-08-09 14:41 ` Darrel Goeddel
2007-08-09 14:57 ` Paul Moore
2007-08-09 15:07 ` Darrel Goeddel
2007-08-09 15:32 ` Casey Schaufler
2007-08-09 15:39 ` Stephen Smalley
2007-08-09 16:16 ` Casey Schaufler
2007-08-09 14:09 ` Darrel Goeddel
2007-08-09 14:24 ` James Morris
2007-08-09 16:42 ` Darrel Goeddel
2007-08-09 19:20 ` Joe Nall
2007-08-09 19:47 ` Darrel Goeddel
2007-08-09 20:12 ` Joe Nall
2007-08-09 21:15 ` Stephen Smalley
2007-08-09 21:18 ` Darrel Goeddel
2007-08-09 22:48 ` Paul Moore
2007-08-09 20:17 ` Paul Moore
2007-08-09 14:53 ` Paul Moore
2007-08-09 16:08 ` Darrel Goeddel
2007-08-09 22:55 ` Darrel Goeddel [this message]
2007-08-10 16:49 ` James Morris
2007-08-14 14:47 ` Darrel Goeddel
2007-08-15 4:24 ` James Morris
2007-08-15 22:35 ` Darrel Goeddel
2007-08-16 15:04 ` James Morris
2007-08-24 16:31 ` Paul Moore
2007-08-24 18:34 ` James Morris
2007-08-24 19:02 ` Casey Schaufler
2007-08-24 19:49 ` Paul Moore
2007-08-24 20:17 ` James Morris
2007-08-24 20:24 ` Paul Moore
2007-08-24 20:47 ` Joshua Brindle
2007-08-24 20:42 ` Casey Schaufler
2007-08-24 21:10 ` Paul Moore
2007-08-24 21:37 ` Casey Schaufler
2007-08-24 20:29 ` Joshua Brindle
2007-08-28 14:03 ` Darrel Goeddel
2007-08-28 15:16 ` Paul Moore
2007-08-09 15:48 ` Casey Schaufler
2007-08-09 19:38 ` Paul Moore
-- strict thread matches above, loose matches on Subject: below --
2007-08-24 17:37 Venkat Yekkirala
2007-08-25 21:01 ` Paul Moore
2007-08-24 18:11 Venkat Yekkirala
2007-08-27 12:44 Venkat Yekkirala
2007-08-27 14:37 ` Paul Moore
2007-08-27 12:57 Venkat Yekkirala
2007-08-27 12:59 Venkat Yekkirala
2007-08-27 13:02 Venkat Yekkirala
2007-08-27 13:48 ` Paul Moore
2007-08-27 22:09 Venkat Yekkirala
2007-08-28 14:51 ` Paul Moore
2007-08-28 14:58 ` Darrel Goeddel
2007-08-28 15:12 ` Darrel Goeddel
2007-08-28 15:51 ` Paul Moore
2007-08-28 16:18 ` Joe Nall
2007-08-28 18:51 ` Paul Moore
2007-08-28 19:10 ` Joe Nall
2007-08-28 19:08 ` Stephen Smalley
2007-08-28 19:48 ` Joshua Brindle
2007-08-28 22:26 ` Joe Nall
2007-08-29 0:16 ` Joshua Brindle
2007-08-29 3:45 ` Joshua Brindle
2007-08-29 4:11 ` Joshua Brindle
2007-08-29 4:49 ` Joe Nall
2007-08-29 14:04 ` Joshua Brindle
2007-08-29 15:50 ` Joe Nall
2007-08-29 16:31 ` Joshua Brindle
2007-08-29 12:21 ` Paul Moore
2007-08-29 14:26 ` Joshua Brindle
2007-08-29 14:56 ` Paul Moore
2007-08-29 15:08 ` Joshua Brindle
2007-08-29 16:55 ` Paul Moore
2007-08-28 17:23 ` Darrel Goeddel
2007-08-28 19:07 ` Paul Moore
2007-08-28 16:13 Venkat Yekkirala
2007-08-28 16:32 ` Joe Nall
2007-08-28 19:08 ` Paul Moore
2007-08-28 16:30 Venkat Yekkirala
2007-08-28 17:39 ` Darrel Goeddel
2007-08-28 19:36 ` Paul Moore
2007-08-28 19:26 ` Paul Moore
2007-08-28 18:02 Venkat Yekkirala
2007-08-28 19:47 ` Paul Moore
2007-08-29 15:07 Venkat Yekkirala
2007-08-29 15:29 Venkat Yekkirala
2007-08-29 15:45 ` Stephen Smalley
2007-08-29 16:15 Venkat Yekkirala
2007-08-29 16:41 ` 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=46BB9B79.2070602@trustedcs.com \
--to=dgoeddel@trustedcs.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=joe@nall.com \
--cc=kaigai@ak.jp.nec.com \
--cc=paul.moore@hp.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.