From: Paul Moore <paul.moore@hp.com>
To: David Miller <davem@davemloft.net>
Cc: 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: Fri, 28 Jul 2006 14:45:53 -0400 [thread overview]
Message-ID: <44CA5B61.3010704@hp.com> (raw)
In-Reply-To: <20060728.005542.21593420.davem@davemloft.net>
David Miller wrote:
> From: paul.moore@hp.com
> Date: Mon, 17 Jul 2006 11:52:26 -0400
>>@@ -617,6 +618,8 @@ int inet_accept(struct socket *sock, str
>>
>> sock_graft(sk2, newsock);
>>
>>+ netlbl_socket_inet_accept(sock, newsock);
>>+
>> newsock->state = SS_CONNECTED;
>> err = 0;
>> release_sock(sk2);
>
> 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.
I'm happy to drop this hook as it *looks* like the MLSXFRM patchset is
going to make it which has some of the accept hooks I was hoping to get,
but figured I stood a "snowballs chance in hell" trying to get it in
solely for use with CIPSO :) I'll drop this on the next release of the
NetLabel patchset and assuming both the NetLabel and the MLSXFRM
patchset make it into the 2.6.19 release I'll issue another small
patchset then to integrate into the new LSM hooks for accept. I'd do it
now but I think it would cause too much of a mess with patch
dependencies/collisions/etc.
>>- case 0x86: /* Another "Commercial Security" crap. */
>>+ case IPOPT_CIPSO:
>
> I am sad to see this comment disappear :-)
... and I was surprised you didn't comment about that change sooner ;)
--
paul moore
linux security @ hp
next prev parent reply other threads:[~2006-07-28 18:45 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-17 15:52 [PATCH 0/7] Updated patchset w/James' comments paul.moore
2006-07-17 15:52 ` [PATCH 1/7] NetLabel: documentation paul.moore
2006-07-28 7:51 ` David Miller
2006-07-28 18:52 ` 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 [this message]
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-17 15:52 ` [PATCH 3/7] NetLabel: CIPSOv4 engine paul.moore
2006-07-28 7:56 ` David Miller
2006-07-17 15:52 ` [PATCH 4/7] NetLabel: core NetLabel subsystem paul.moore
2006-07-17 15:52 ` [PATCH 5/7] NetLabel: CIPSOv4 and Unlabeled packet integration paul.moore
2006-07-17 15:52 ` [PATCH 6/7] NetLabel: SELinux support paul.moore
2006-07-17 15:52 ` [PATCH 7/7] NetLabel: tie NetLabel into the Kconfig system paul.moore
2006-07-17 18:48 ` [PATCH 0/7] Updated patchset w/James' comments Valdis.Kletnieks
2006-07-17 19:00 ` Paul Moore
-- strict thread matches above, loose matches on Subject: below --
2006-07-31 12:43 [PATCH 2/7] NetLabel: core network changes Venkat Yekkirala
2006-07-31 14:16 ` Paul Moore
2006-07-29 16:34 Venkat Yekkirala
2006-07-29 21:03 ` 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=44CA5B61.3010704@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 \
/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).