From: Paul Moore <paul.moore@hp.com>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>,
Venkat Yekkirala <vyekkirala@TrustedCS.com>,
Karl MacMillan <kmacmillan@mentalrootkit.com>,
latten@austin.ibm.com, jmorris@redhat.com, dwalsh@redhat.com,
Darrel Goeddel <DGoeddel@TrustedCS.com>,
Chad Hanson <chanson@TrustedCS.com>,
selinux@tycho.nsa.gov
Subject: Re: Labeled networking packets
Date: Fri, 22 Sep 2006 11:25:12 -0400 [thread overview]
Message-ID: <45140058.60902@hp.com> (raw)
In-Reply-To: <1158937085.17541.27.camel@twoface.columbia.tresys.com>
Joshua Brindle wrote:
> On Fri, 2006-09-22 at 10:47 -0400, Paul Moore wrote:
>
>><snip>
>>
>>>This scheme has a new label that is negotiated by racoon and is used
>>
>>as
>>
>>>the subject label returned by getpeercon(), it is different from
>>
>>what we
>>
>>>are already doing. The rest would basically be the same, there would
>>
>>be
>>
>>>no reconciliation. The only thing I'm not sure of here is the
>>>interaction of the label negotiated by racoon and a cipso label. It
>>>almost seems like we need to disallow using them at the same time, I
>>>suspect people might not like this limitation though.
>>>
>>
>>Since all of the remote network labeling mechanisms, SA and NetLabel
>>labeling, are relatively new to Linux I think it's going to be hard to
>>say for certain how users will end up using them. While similar in
>>that
>>both mechanisms allow remote packet labeling, they acomplish very
>>different goals so I think it is reasonable to expect users who need
>>remote network labeling to run both SA and NetLabel labels on the same
>>system.
>
> so we need to define the limitations now before people start using them
> in unexpected ways.
No argument here.
>>Ignoring the secmark issue for a moment ...
>
> there is no secmark issue, secmark isn't for labeling.
That's why I said to ignore it ;)
>>Resolving a SA label and a NetLabel label right now isn't too
>>difficult.
>> Currently we do two separate checks for each labeling mechanism. If
>>we
>>wanted to consolidate the checks into one we could do as Stephen
>>originally suggested and check to make sure that the NetLabel label
>>falls within the range of the SA label and that the socket was allowed
>>to receive packets from the resulting combination (TE from the SA
>>context, MLS label from NetLabel). This becomes a bit more
>>complicated
>>once NetLabel starts labeling packets with a full context but the
>>basics
>>would still apply I believe.
>
> Right, that is all well and good as long as netlabel is MLS only. I
> don't think we should be making assumptions like checking that the
> netlabel is within the range of the SA label if there is ever an
> expectation of doing full contexts in netlabel.
That is reasonable. I don't want to distract from the discussion going
on right now with a discussion about the pros/cons of NetLabel sending
full contexts, but I think it would be a good idea to stop thinking of
NetLabel just a CIPSO/MLS and instead think of it as a full context like
the IPsec/SA labeling mechanism. With this in mind, perhaps we just
stick to having two separate access checks, one for SA labeling and one
for NetLabel labeling. In a way it punts on the problem and pushes into
policy, but that may be the best option as policy is far more flexibile
than code. After all, isn't this one of the main selling points of
TE/FLASK/SELinux?
> Further, I don't think we've fully understood each other yet. I don't
> want the SA label used for anything except permission checks. The SA
> label is the 'local socket' label for an association and isn't
> interesting at all. The label returned with getpeercon() should be a
> domain label that is negotiated by racoon.
I don't want to speak for the SA labeling, that's Venkat's baby.
However, I can speak for NetLabel and I think so far NetLabel does what
you want, if not perhaps we can agree on a change.
Currently NetLabel labels packets using the context of the socket
sending the packets, there is no transition. In normal usage the
socket's context is derived from the domain, however, "SELinux aware"
applications using recent kernels have the ability to specify the
context of the socket and as a result the NetLabel context.
On the receive side, when using NetLabel the context returned by
getpeercon() is currently a combination of the receiving socket's
context and the NetLabel's MLS label. For example:
* receiving process's context: user_u:role_r:app_t
* receiving socket's context: user_u:role_r:app_t
* NetLabel context: ??????:??????:?????:s7:c8.c12
* getpeercon() returns: user_u:role_r:app_t:s7:c8.c12
This is done so that the returned context is suitable for a call to
setexeccon(). In the future once NetLabel supports full contexts then
getpeercon() will return the NetLabel context.
I believe this is what you are looking for, at least for the
"non-SELinux aware" set of applications. Yes?
> I think we've mostly agreed that getpeercon() should be returning
> domains, now the question is how. Assuming the racoon thing works we can
> get one from ipsec, and netlabel obviously has a labeling scheme. If
> both are in use we have an ambiguous label which I think is an error, I
> don't think trying to reconcile both labels using a type_transition is
> the right way to go (domain_a->domain_b == new_domain?), I'm not even
> sure what the ramifications are there.
Good point. We could always have getpeercon() error out if both SA and
NetLabel labels are present. It may not be ideal, but it's safe.
> Do you have a scenario where one might want both labeling schemes at the
> same time? Note that if you need netlabel (legacy os on the other side)
> and you also want ipsec for integrity then the isakmp negotiation would
> not include a context and netlabel would be used.
Honestly, I can't think of why you would want to use both SA and
NetLabel labeling on the same connection - that's just stupid :)
However, I can see users wanting to have then active on the same host,
imagine a SELinux box talking to both legacy Trusted OSs and other
SELinux boxes - this is the case I was talking about earlier.
--
paul moore
linux security @ 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.
next prev parent reply other threads:[~2006-09-22 15:25 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 0:44 Labeled networking packets 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 [this message]
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
-- 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:55 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
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
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-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=45140058.60902@hp.com \
--to=paul.moore@hp.com \
--cc=DGoeddel@TrustedCS.com \
--cc=chanson@TrustedCS.com \
--cc=dwalsh@redhat.com \
--cc=jbrindle@tresys.com \
--cc=jmorris@redhat.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=latten@austin.ibm.com \
--cc=sds@epoch.ncsc.mil \
--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.