All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: vyekkirala@TrustedCS.com
Cc: SE Linux <selinux@tycho.nsa.gov>,
	James Morris <jmorris@namei.org>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Networking Patch (outline)
Date: Tue, 11 Sep 2007 15:31:37 -0400	[thread overview]
Message-ID: <200709111531.37143.paul.moore@hp.com> (raw)
In-Reply-To: <001301c7f492$00f83ea0$cc0a010a@tcssec.com>

On Tuesday, September 11 2007 12:37:10 pm Venkatesh Yekkirala wrote:
> > > If we want to flow-control just once, another option to
> >
> > consider would be
> >
> > > using rcv_skb for locally destined traffic and a new hook
> >
> > into ip_forward()
> >
> > > for flow-control of forwarded traffic coming-in.
> >
> > Yeah, that's an option, I'm just a little adverse to having
> > to add hooks in
> > the different *_rcv_skb() functions; I'd much prefer them to
> > be at a lower
> > level where we would need less hooks.  Although, we could
> > just piggyback on
> > the existing sk_filter/security_sock_recv_skb() hook since it
> > appears in most
> > of the *_rcv_skb() functions I've looked at (I suspect it's
> > in all, but
> > haven't bothered to check yet).
>
> Piggybacking is what I meant ("using" rcv_skb and a "new" hook
> into ip_forward() :).

One of these days we'll figure out what each other means the first time 
around ;)

> > Time to go for a walk and think about this some more ...
>
> Actually, postroute_last would be hit for each xfrm as well.
> So, perhaps a separate LSM hook into say ip_output() ...

Yep, I'd say we even need to move the check farther down into the call stack 
to ip_finish_output2() or at least after the XFRM check in ip_finish_output() 
so we avoid problems with source NAT (see the check at the top of 
ip_finish_output()).  Sadly, using netfilter hooks doesn't look like it will 
work.

I think this is the current summary of what we think we need in terms of new 
hooks to do flow control, take a look and see if you agree.  The one thing I 
still want to check is how the ipv6 portion of the stack handles options; 
it's a bit different than ipv4 for obvious reasons and I want to make sure 
our hook placement for ipv6 doesn't cause us any problems in the future.

 * Inbound packets (flow in check)
   - add to existing security_sock_rcv_skb() hook for locally consumed
     packets
   - new hook in ip[6]_forward_finish(), before the call to  
     ip_forward_options() for ipv4, to catch packets not destined for the
     local machine

 * Outbound packets (flow out check)
   - new hook in ip_finish_output()/ip6_output_finish() to catch all outbound
     packets, including forwarded packets on their way out

-- 
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:[~2007-09-11 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 22:40 Networking Patch (outline) Venkat Yekkirala
2007-08-31 23:04 ` Paul Moore
2007-09-05 22:27 ` Paul Moore
2007-09-06 16:08   ` Venkatesh Yekkirala
2007-09-06 17:34     ` Paul Moore
2007-09-11 16:37       ` Venkatesh Yekkirala
2007-09-11 19:31         ` Paul Moore [this message]
2007-09-12 17:08           ` Venkatesh Yekkirala
2007-09-12 18:52             ` 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=200709111531.37143.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=jmorris@namei.org \
    --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.