netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/17] CALIPSO implementation
@ 2015-12-22 11:46 Huw Davies
  2015-12-22 17:28 ` Casey Schaufler
  0 siblings, 1 reply; 4+ messages in thread
From: Huw Davies @ 2015-12-22 11:46 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	selinux-+05T5uksL2qpZYMLLGbcSA

This patch series implements RFC 5570 - Common Architecture Label IPv6
Security Option (CALIPSO).  Its goal is to set MLS sensitivity labels
on IPv6 packets using a hop-by-hop option.  CALIPSO very similar to
its IPv4 cousin CIPSO and much of this series is based on that code.

Most of this series involves adding support to NetLabel and adding a
CALIPSO module within IPv6, and as such is fairly self-contained.
There are however a few places where I've needed to add things to the
core networking stack, so I'd be particularly interested in hearing
comments about these:

[PATCH 08/17] ipv6: Add ipv6_renew_options_kern() that accepts a kernel mem pointer.
  Hopefully not too controversial - adds a kernel memory version of
  ipv6_renew_options()

[PATCH 12/17] ipv6: Allow request socks to contain IPv6 options.
  We need a way to set the IPv6 options on request sockets, just like
  we do for IPv4.  This is so that the LSM can ensure the SYN-ACK is
  correctly labelled.

The series is based off v4.4-rc6.

Thoughts about these and any of the other patches are most welcome.

If anybody actually wants to play with this, then you'll need some patches
to netlabel-tools that are currently available on the 'calipso' branch at:
https://github.com/hdmdavies/netlabel_tools.git

Thanks to Paul Moore for his guidance in getting this far.

Huw.
_______________________________________________
Selinux mailing list
Selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org
To unsubscribe, send email to Selinux-leave-+05T5uksL2pAGbPMOrvdOA@public.gmane.org
To get help, send an email containing "help" to Selinux-request-+05T5uksL2pAGbPMOrvdOA@public.gmane.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH 00/17] CALIPSO implementation
  2015-12-22 11:46 [RFC PATCH 00/17] CALIPSO implementation Huw Davies
@ 2015-12-22 17:28 ` Casey Schaufler
  2015-12-22 17:40   ` Huw Davies
  2015-12-23 18:07   ` Paul Moore
  0 siblings, 2 replies; 4+ messages in thread
From: Casey Schaufler @ 2015-12-22 17:28 UTC (permalink / raw)
  To: Huw Davies, netdev, linux-security-module, selinux, Casey Schaufler

On 12/22/2015 3:46 AM, Huw Davies wrote:
> This patch series implements RFC 5570 - Common Architecture Label IPv6
> Security Option (CALIPSO).  Its goal is to set MLS sensitivity labels
> on IPv6 packets using a hop-by-hop option.  CALIPSO very similar to
> its IPv4 cousin CIPSO and much of this series is based on that code.

There's a one line change to the Smack code in 15/17 due to
a change in the api, but I assume that there has been no
attempt to verify that this works with Smack. It's not 100%
clear that this won't break a Smack kernel, but I haven't
tried it.

You'll need to provide sufficient information (or code!) so
that security modules other than SELinux can use this. If
you look at how Smack uses netlabel for IPv4 you will see
that it differs substantially from the way SELinux uses it.

Thank you for tackling RFC 5570. The lack of something like
this has put IPv6 at a real disadvantage.

>
> Most of this series involves adding support to NetLabel and adding a
> CALIPSO module within IPv6, and as such is fairly self-contained.
> There are however a few places where I've needed to add things to the
> core networking stack, so I'd be particularly interested in hearing
> comments about these:
>
> [PATCH 08/17] ipv6: Add ipv6_renew_options_kern() that accepts a kernel mem pointer.
>   Hopefully not too controversial - adds a kernel memory version of
>   ipv6_renew_options()
>
> [PATCH 12/17] ipv6: Allow request socks to contain IPv6 options.
>   We need a way to set the IPv6 options on request sockets, just like
>   we do for IPv4.  This is so that the LSM can ensure the SYN-ACK is
>   correctly labelled.
>
> The series is based off v4.4-rc6.
>
> Thoughts about these and any of the other patches are most welcome.
>
> If anybody actually wants to play with this, then you'll need some patches
> to netlabel-tools that are currently available on the 'calipso' branch at:
> https://github.com/hdmdavies/netlabel_tools.git
>
> Thanks to Paul Moore for his guidance in getting this far.
>
> Huw.
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH 00/17] CALIPSO implementation
  2015-12-22 17:28 ` Casey Schaufler
@ 2015-12-22 17:40   ` Huw Davies
  2015-12-23 18:07   ` Paul Moore
  1 sibling, 0 replies; 4+ messages in thread
From: Huw Davies @ 2015-12-22 17:40 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: netdev, linux-security-module, selinux

On Tue, Dec 22, 2015 at 09:28:37AM -0800, Casey Schaufler wrote:
> On 12/22/2015 3:46 AM, Huw Davies wrote:
> > This patch series implements RFC 5570 - Common Architecture Label IPv6
> > Security Option (CALIPSO).  Its goal is to set MLS sensitivity labels
> > on IPv6 packets using a hop-by-hop option.  CALIPSO very similar to
> > its IPv4 cousin CIPSO and much of this series is based on that code.
> 
> There's a one line change to the Smack code in 15/17 due to
> a change in the api, but I assume that there has been no
> attempt to verify that this works with Smack. It's not 100%
> clear that this won't break a Smack kernel, but I haven't
> tried it.

That's correct, I've not looked into Smack at all.  I'll
see if I can figure out what's needed.

Huw.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH 00/17] CALIPSO implementation
  2015-12-22 17:28 ` Casey Schaufler
  2015-12-22 17:40   ` Huw Davies
@ 2015-12-23 18:07   ` Paul Moore
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Moore @ 2015-12-23 18:07 UTC (permalink / raw)
  To: Casey Schaufler, Huw Davies; +Cc: netdev, linux-security-module, selinux

On Tue, Dec 22, 2015 at 12:28 PM, Casey Schaufler
<casey@schaufler-ca.com> wrote:
> On 12/22/2015 3:46 AM, Huw Davies wrote:
>> This patch series implements RFC 5570 - Common Architecture Label IPv6
>> Security Option (CALIPSO).  Its goal is to set MLS sensitivity labels
>> on IPv6 packets using a hop-by-hop option.  CALIPSO very similar to
>> its IPv4 cousin CIPSO and much of this series is based on that code.
>
> There's a one line change to the Smack code in 15/17 due to
> a change in the api, but I assume that there has been no
> attempt to verify that this works with Smack. It's not 100%
> clear that this won't break a Smack kernel, but I haven't
> tried it.
>
> You'll need to provide sufficient information (or code!) so
> that security modules other than SELinux can use this. If
> you look at how Smack uses netlabel for IPv4 you will see
> that it differs substantially from the way SELinux uses it.

Smack is going to have some difficulties implementing CALIPSO due to
some previous design decisions and inconsistencies between how Smack
handles both IPv4 and IPv6 packet labeling today.  I think we can all
agree that asking Huw to resolve these problems isn't quite fair,
although asking Huw to make sure he doesn't break existing
functionality *is* fair, and a requirement for patch acceptance.

Huw, I would suggest you ensure that the NetLabel/CALIPSO changes
don't break the existing Smack code, and that everything is commented
appropriately.  Adding CALIPSO support to the netlbl_cfg_*() functions
in netlabel_kapi.c would also be a good idea, and shouldn't be too
difficult (I should have commented on this earlier, my mistake).
However, I think resolving the Smack IPv6 design issues is something
best left to Casey and the rest of the Smack developers.

> Thank you for tackling RFC 5570. The lack of something like
> this has put IPv6 at a real disadvantage.

Agreed, thanks Huw for all the hard work you put into this
implementation.  I started a similar effort on two separate occasions
but never had the time to see it through to the end; I'm happy that
someone was finally able to get it finished.

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-23 18:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 11:46 [RFC PATCH 00/17] CALIPSO implementation Huw Davies
2015-12-22 17:28 ` Casey Schaufler
2015-12-22 17:40   ` Huw Davies
2015-12-23 18:07   ` Paul Moore

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