All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: Brian Sniffen <bsniffen@mitre.org>
Cc: selinux@tycho.nsa.gov
Subject: Re: Network access controls (resolving xfrm, secmark, and NetLabel)
Date: Tue, 09 May 2006 11:10:05 -0400	[thread overview]
Message-ID: <4460B0CD.30500@hp.com> (raw)
In-Reply-To: <m24pzz6zb1.fsf@raven-king.mitre.org>

Brian Sniffen wrote:
> Paul Moore <paul.moore@hp.com> writes:
> 
>>The secmark approach requires the labeling mechanism to live inside
>>the netfilter code (correct James?) while the NetLabel approach
>>allows the labeling mechanism to happen anywhere it can, in the xfrm
>>transforms, netfilter, you name it.
> 
> The sequencing of netfilter makes it very clear how to handle multiple
> attempts to apply a label, and very easy to be sure which labels will
> be applied to which packets.  With multiple NetLabel points of
> contact, how much will you be able to tell statically about the labels
> on various sorts of packet?  In how many places will an analyst need
> to look?
> 

If we could do everything in netfilter then I agree with you completely. 
However, I'm not sure that forcing everything to use netfilter is really the 
best solution.  Lets use CIPSO as an example ...

On the incoming side it wouldn't be that difficult to use netfilter and the 
secmark field.  Essentially we would just move the CIPSO IP option validation 
and decoding from their current spots in the IP and socket layers into 
netfilter.  We could argue the merits of such a decision but I believe it would 
work.

The outgoing side would be a bit more difficult.  We would need to create a 
mechanism to set the secmark field on outgoing packets as they leave the 
application (I didn't see this in James patches, please let me know if I missed 
something) and then we would need to add the CIPSO IP option to the packet in 
the netfilter layer, which is the problem.  Assuming it is okay to increase the 
size of the packet in the netfilter layer (I have a nagging memory that I was 
once told this is not allowed, but I can't remember where I heard that) so that 
we could add the CIPSO IP option we are then faced with the following problems:

  * the IP checksum now needs to be recalculated
  * we might not have enough room in the IP header depending on other
    IP options
  * we will most likely run into PMTU problems
  * the IPsec AH transform, if present, is now incorrect

... there are most likely others, these are just the first few that popped into 
my head while typing this.

I think the netfilter/secmark approach is a great improvement for implicit, 
host-generated packet labels but I'm still not convinced it is ideal for 
explicit, dynamic packet labels such as CIPSO.

-- 
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.

  reply	other threads:[~2006-05-09 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 16:27 Network access controls (resolving xfrm, secmark, and NetLabel) Paul Moore
2006-05-09 14:35 ` Brian Sniffen
2006-05-09 15:10   ` Paul Moore [this message]
2006-05-09 15:30     ` Brian Sniffen
2006-05-09 15:59       ` 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=4460B0CD.30500@hp.com \
    --to=paul.moore@hp.com \
    --cc=bsniffen@mitre.org \
    --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.