From: James Morris <jmorris@namei.org> To: Paul Moore <paul.moore@hp.com> Cc: netdev@vger.kernel.org, selinux@tycho.nsa.gov, Stephen Smalley <sds@tycho.nsa.gov>, Andrew Morton <akpm@osdl.org>, "David S. Miller" <davem@davemloft.net> Subject: Re: [PATCH 1/6] NetLabel: correctly initialize the NetLabel fields Date: Tue, 29 Aug 2006 15:17:56 -0400 (EDT) [thread overview] Message-ID: <Pine.LNX.4.64.0608291514060.30227@d.namei> (raw) In-Reply-To: <44F47FB0.5000700@hp.com> On Tue, 29 Aug 2006, Paul Moore wrote: > James Morris wrote: > > On Tue, 29 Aug 2006, paul.moore@hp.com wrote: > >>+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, > >>+ int family) > >>+{ > >>+ if (family == PF_INET) > > > > No tab. > > I see you already ack'd this patch, should I resubmit with the tab > correction or just leave it alone? Probably easiest to fix it as it's applied. > Example case: > > 1. Configure NetLabel so that packets are labeled with CIPSO > 2. Ensure SSH is listening for both IPv4 and IPv6 connections and > restart the daemon > 3. Connect to the SSH daemon using IPv4 > > I haven't looked at the sshd code enough in detail to see what it is > doing exactly but simply running 'netstat -nl' shows that sshd is > listening for connections with an IPv6 socket (at least it is listening > on port ':::22'). Once the connection is established the daemon > continues to use an IPv6 socket, '::ffff:127.0.0.1:22', whereas the > client uses a traditional IPv4 socket. Sniffing the connection > indicates that both directions of network traffic are labeled with the > correct CIPSO tags. IIRC, the way I originally tested this was to write a simple app. I wonder if something has changed in the networking code which means we don't need to test for this now. > On the outbound side, yes, we only NetLabel sockets which are PF_INET > but I didn't think I could set an IPv4 option on a PF_INET6 socket can > I? It just sounds wrong ... If it's carrying IPv4 traffic, it may make sense in some cases. - James -- James Morris <jmorris@namei.org>
WARNING: multiple messages have this Message-ID (diff)
From: James Morris <jmorris@namei.org> To: Paul Moore <paul.moore@hp.com> Cc: netdev@vger.kernel.org, selinux@tycho.nsa.gov, Stephen Smalley <sds@tycho.nsa.gov>, Andrew Morton <akpm@osdl.org>, "David S. Miller" <davem@davemloft.net> Subject: Re: [PATCH 1/6] NetLabel: correctly initialize the NetLabel fields Date: Tue, 29 Aug 2006 15:17:56 -0400 (EDT) [thread overview] Message-ID: <Pine.LNX.4.64.0608291514060.30227@d.namei> (raw) In-Reply-To: <44F47FB0.5000700@hp.com> On Tue, 29 Aug 2006, Paul Moore wrote: > James Morris wrote: > > On Tue, 29 Aug 2006, paul.moore@hp.com wrote: > >>+void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, > >>+ int family) > >>+{ > >>+ if (family == PF_INET) > > > > No tab. > > I see you already ack'd this patch, should I resubmit with the tab > correction or just leave it alone? Probably easiest to fix it as it's applied. > Example case: > > 1. Configure NetLabel so that packets are labeled with CIPSO > 2. Ensure SSH is listening for both IPv4 and IPv6 connections and > restart the daemon > 3. Connect to the SSH daemon using IPv4 > > I haven't looked at the sshd code enough in detail to see what it is > doing exactly but simply running 'netstat -nl' shows that sshd is > listening for connections with an IPv6 socket (at least it is listening > on port ':::22'). Once the connection is established the daemon > continues to use an IPv6 socket, '::ffff:127.0.0.1:22', whereas the > client uses a traditional IPv4 socket. Sniffing the connection > indicates that both directions of network traffic are labeled with the > correct CIPSO tags. IIRC, the way I originally tested this was to write a simple app. I wonder if something has changed in the networking code which means we don't need to test for this now. > On the outbound side, yes, we only NetLabel sockets which are PF_INET > but I didn't think I could set an IPv4 option on a PF_INET6 socket can > I? It just sounds wrong ... If it's carrying IPv4 traffic, it may make sense in some cases. - James -- James Morris <jmorris@namei.org> -- 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-08-29 19:17 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-08-29 14:42 [PATCH 0/6] Various NetLabel fixes and cleanups paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 14:42 ` [PATCH 1/6] NetLabel: correctly initialize the NetLabel fields paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:51 ` James Morris 2006-08-29 16:51 ` James Morris 2006-08-29 17:56 ` Paul Moore 2006-08-29 17:56 ` Paul Moore 2006-08-29 19:17 ` James Morris [this message] 2006-08-29 19:17 ` James Morris 2006-08-29 20:21 ` Paul Moore 2006-08-29 20:21 ` Paul Moore 2006-08-29 17:01 ` James Morris 2006-08-29 17:01 ` James Morris 2006-08-29 14:42 ` [PATCH 2/6] NetLabel: remove unused function prototypes paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:56 ` James Morris 2006-08-29 16:56 ` James Morris 2006-08-29 14:42 ` [PATCH 3/6] NetLabel: comment corrections paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:57 ` James Morris 2006-08-29 16:57 ` James Morris 2006-08-29 14:42 ` [PATCH 4/6] NetLabel: cleanup ebitmap_import() paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:58 ` James Morris 2006-08-29 16:58 ` James Morris 2006-08-29 14:42 ` [PATCH 5/6] NetLabel: uninline selinux_netlbl_inode_permission() paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:54 ` James Morris 2006-08-29 16:54 ` James Morris 2006-08-29 14:42 ` [PATCH 6/6] NetLabel: add some missing #includes to various header files paul.moore 2006-08-29 14:42 ` paul.moore 2006-08-29 16:56 ` James Morris 2006-08-29 16:56 ` James Morris 2006-08-30 0:56 ` [PATCH 0/6] Various NetLabel fixes and cleanups David Miller 2006-08-30 13:18 ` Paul Moore 2006-08-30 13:18 ` 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=Pine.LNX.4.64.0608291514060.30227@d.namei \ --to=jmorris@namei.org \ --cc=akpm@osdl.org \ --cc=davem@davemloft.net \ --cc=netdev@vger.kernel.org \ --cc=paul.moore@hp.com \ --cc=sds@tycho.nsa.gov \ --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: linkBe 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.