From: Paul Moore <paul.moore@hp.com>
To: Venkat Yekkirala <vyekkirala@trustedcs.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, selinux@tycho.nsa.gov,
sds@epoch.ncsc.mil, jmorris@redhat.com, pratt@argus-systems.com
Subject: Re: [PATCH 2/7] NetLabel: core network changes
Date: Sat, 29 Jul 2006 17:03:33 -0400 [thread overview]
Message-ID: <200607291703.34579.paul.moore@hp.com> (raw)
In-Reply-To: <36282A1733C57546BE392885C0618592013E80BD@chaos.tcs.tcs-sec.com>
On Saturday 29 July 2006 12:34 pm, Venkat Yekkirala wrote:
> > > This is only true wart I see in the patch set from my
> > > perspective.
> > >
> > > You have security_post_accept_hook(), which gets the parent and
> > > the child socket which is all the information you need, and it
> > > seems to be invoked at the correct location.
> > >
> > > So can you please hook into this location using the security
> > > level hook we already have? Just check sock->sk->sk_family is
> > > PF_INET at the top of that hook if you only want to handle
> > > ipv4 sockets, or something like that.
> > >
> > > Could this work?
> > >
> > > When preparing and argument stating why this won't work, please
> > > suggest a nicer name for this af_inet.c hook or some way to make
> > > it more generic and palatable to us.
> >
> > The only reason for having this new hook in inet_accept() is to catch
> > all the in-kernel "daemons" who do not go through the LSM hooked
> > accept() code path. I debated putting this hook into the patchset and
> > in the end figured it was at least worth a shot.
>
> If I understand the patch correctly, the openreq inherits cipso from
> the incoming syn and the syn-ack is then sent with this option. I further
> see that the child sock inherits options from the openreq already.
>
> Could you then please elaborate on the need for explicitly copying options
> from parent to child?
The NetLabel patch allows administrators to assign specific a CIPSO
DOI/configuration to each LSM "domain". Blindly using the CIPSO tag that the
remote host sends could violate the administrator's NetLabel configuration.
The current patch reads the CIPSO tag off the child socket, translating the
tag according to the CIPSO DOI configuration to arrive at the correct/desired
LSM security attributes. These LSM security attributes and the "domain" are
then used to set the NetLabel on the socket. In the case where everyone is
well behaved this should have no effect on the socket IP options and the
packets sent across the wire. However, in the case of a not-nice remote host
the outgoing CIPSO tag may change to match the administrators desired
settings.
It is important to note that the next patchset will be based against David's
net-2.6.19 git tree which has the additional LSM hooks in the accept code
path - which I plan to use - so expect the implementation to change as a
result. Like I said earlier, these new LSM hooks are probably the proper way
to do it, but I wanted to stick with the hooks that were present at the time
I started working on NetLabel to minimize the impact on the kernel.
--
paul moore
linux security @ hp
next prev parent reply other threads:[~2006-07-29 21:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-29 16:34 [PATCH 2/7] NetLabel: core network changes Venkat Yekkirala
2006-07-29 21:03 ` Paul Moore [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-31 12:43 Venkat Yekkirala
2006-07-31 14:16 ` Paul Moore
2006-07-17 15:52 [PATCH 0/7] Updated patchset w/James' comments paul.moore
2006-07-17 15:52 ` [PATCH 2/7] NetLabel: core network changes paul.moore
2006-07-28 7:55 ` David Miller
2006-07-28 18:45 ` Paul Moore
2006-07-28 19:55 ` David Miller
2006-07-28 11:24 ` Thomas Graf
2006-07-28 17:58 ` Paul Moore
2006-07-28 18:12 ` Thomas Graf
2006-07-28 18:39 ` Paul Moore
2006-07-28 18:58 ` Thomas Graf
2006-07-28 19:08 ` Paul Moore
2006-07-28 19:43 ` Evgeniy Polyakov
2006-07-28 19:58 ` David Miller
2006-07-28 20:09 ` Paul Moore
2006-07-28 20:56 ` David Miller
2006-07-28 20:59 ` Paul Moore
2006-07-14 18:57 [PATCH 0/7] Latest NetLabel patch for 2.6.19 paul.moore
2006-07-14 18:57 ` [PATCH 2/7] NetLabel: core network changes paul.moore
2006-07-14 23:34 ` James Morris
2006-07-14 23:36 ` David Miller
2006-07-15 14:48 ` 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=200607291703.34579.paul.moore@hp.com \
--to=paul.moore@hp.com \
--cc=davem@davemloft.net \
--cc=jmorris@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pratt@argus-systems.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).