Re: Seriously, again, about inode_post_removexattr

2007-04-09 Thread Paul Moore
that were added in the 2.6.(18 or 19, can't remember off the top of my head right now) timeframe which allow the LSM to better control/label the sockets during the TCP handshake; this may allow you to do what you want. -- paul moore linux security @ hp - To unsubscribe from this list: send

Re: [PATCH 1/1] Add post accept()/recvmsg() hooks.

2007-07-05 Thread Paul Moore
other ways to read a network socket than just recvmsg(). -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] Add post accept()/recvmsg() hooks.

2007-07-06 Thread Paul Moore
as a netfilter module? Or maybe in userspace using the netfilter userspace queue feature? -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org

Re: [RFC][PATCH] Simplified mandatory access control kernel implementation

2007-07-16 Thread Paul Moore
life easier if for some freak reason we have to change them. For example, 0 == NETLBL_SECATTR_NONE. This applies to a few other places in the code too. I'm sure there will be more comments but these are the ones that jumped out at me. -- paul moore linux security @ hp - To unsubscribe from

Re: [RFC][PATCH] Simplified mandatory access control kernel implementation

2007-07-17 Thread Paul Moore
On Monday, July 16 2007 10:59:41 pm Casey Schaufler wrote: --- Paul Moore [EMAIL PROTECTED] wrote: On Saturday, July 14 2007 5:47:38 pm Casey Schaufler wrote: +#include ../../net/netlabel/netlabel_domainhash.h +#include net/cipso_ipv4.h + + {snip} + +static void smk_cipso_doi(void

Re: [RFC][PATCH] Simplified mandatory access control kernel implementation

2007-07-19 Thread Paul Moore
private email. A public list might also help attract some warm bodies willing to write code ;) -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: [TOMOYO 15/15] LSM expansion for TOMOYO Linux.

2007-08-27 Thread Paul Moore
attempts. Please take a look at the existing LSM stream connection request hooks as well as how SELinux makes use of them. * post_recv_datagram is added in skb_recv_datagram. Can you explain to me why this is not possible using the existing security_socket_sock_rcv_skb() LSM hook? -- paul

Re: [TOMOYO 15/15] LSM expansion for TOMOYO Linux.

2007-08-28 Thread Paul Moore
On Tuesday, August 28 2007 6:39:13 am Tetsuo Handa wrote: Hello. Hello. Paul Moore wrote: * post_recv_datagram is added in skb_recv_datagram. Can you explain to me why this is not possible using the existing security_socket_sock_rcv_skb() LSM hook? socket_sock_rcv_skb() is a hook

Re: [TOMOYO 15/15] LSM expansion for TOMOYO Linux.

2007-09-04 Thread Paul Moore
On Monday 03 September 2007 9:15:27 am Tetsuo Handa wrote: Hello. Hi. Paul Moore wrote: I apologize for not recognizing your approach from our earlier discussion on the LSM mailing list in July. Unfortunately, I have the same objections to these changes that I did back then and from

Re: [TOMOYO 15/15] LSM expansion for TOMOYO Linux.

2007-09-06 Thread Paul Moore
-accept() failed. I think socket_post_accept() should be able to fail. From my experience the community disapproves of approaches which go through the entire TCP handshake and then terminate the connection, which is what allowing security_socket_post_accept() to fail would do. -- paul

Re: [PATCH] Version 3 (2.6.23-rc8) Smack: Simplified Mandatory Access Control Kernel

2007-09-30 Thread Paul Moore
be able to elsewhere and I consider that a win. -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Version 3 (2.6.23-rc8) Smack: Simplified Mandatory Access Control Kernel

2007-09-30 Thread Paul Moore
On Sunday 30 September 2007 4:16:18 am Andrew Morton wrote: - hm, netlabels. Who might be a suitable person to review that code? Seems that Paul Moore is the man. Maybe he'd be interested in taking a look over it (please?) Yep, I've been tracking Casey's work on this since the first

Re: [PATCH] Version 7 (2.6.23) Smack: Simplified Mandatory Access Control Kernel

2007-10-15 Thread Paul Moore
options/labels. -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[RFC PATCH v6 00/13] Labeled networking patches

2007-11-09 Thread Paul Moore
unlbl list # netlabelctl -p unlbl list If you have any questions/problems/comments feel free to either drop me mail privately or post something to the list. Thanks. -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module

[RFC PATCH v6 01/13] NetLabel: remove unneeded RCU read locks

2007-11-09 Thread Paul Moore
This patch removes some unneeded RCU read locks as we can treat the reads as safe even without RCU. It also converts the NetLabel configuration refcount from a spinlock protected u32 into atomic_t to be more consistent with the rest of the kernel. --- net/netlabel/netlabel_cipso_v4.c |5

[RFC PATCH v6 02/13] NetLabel: cleanup the LSM domain hash functions

2007-11-09 Thread Paul Moore
The NetLabel/LSM domain hash table search function used a argument to specify if the default entry should be returned if an exact match couldn't be found in the hash table. This is a bit against the kernel's style so make two separate functions to represent the separate behaviors. ---

[RFC PATCH v6 07/13] SELinux: Add a capabilities bitmap to SELinux policy version 22

2007-11-09 Thread Paul Moore
Add a new policy capabilities bitmap to SELinux policy version 22. This bitmap will enable the security server to query the policy to determine which features it supports. --- security/selinux/Kconfig|2 - security/selinux/include/security.h | 15 ++

[RFC PATCH v6 08/13] SELinux: Add new peer permissions to the Flask definitions

2007-11-09 Thread Paul Moore
Add additional Flask definitions to support the new peer object class. --- security/selinux/include/av_perm_to_string.h |3 +++ security/selinux/include/av_permissions.h|3 +++ security/selinux/include/class_to_string.h |7 +++ security/selinux/include/flask.h |

[RFC PATCH v6 10/13] SELinux: Enable dynamic enable/disable of the network access checks

2007-11-09 Thread Paul Moore
This patch introduces a mechanism for checking when labeled IPsec or SECMARK are in use by keeping introducing a configuration reference counter for each subsystem. In the case of labeled IPsec, whenever a labeled SA or SPD entry is created the labeled IPsec/XFRM reference count is increased and

[RFC PATCH v6 12/13] NetLabel: introduce static network labels for unlabeled connections

2007-11-09 Thread Paul Moore
Most trusted OSs, with the exception of Linux, have the ability to specify static security labels for unlabeled networks. This patch adds this ability to the NetLabel packet labeling framework. If the NetLabel subsystem is called to determine the security attributes of an incoming packet it

[RFC PATCH v6 13/13] NetLabel: add auditing to the static labeling mechanism

2007-11-09 Thread Paul Moore
This patch adds auditing support to the NetLabel static labeling mechanism. --- include/linux/audit.h |2 + net/netlabel/netlabel_unlabeled.c | 127 +++-- 2 files changed, 107 insertions(+), 22 deletions(-) diff --git a/include/linux/audit.h

[RFC PATCH v6 06/13] NetLabel: add IP address family information to the netlbl_skbuff_getattr() function

2007-11-09 Thread Paul Moore
In order to do any sort of IP header inspection of incoming packets we need to know which address family, AF_INET/AF_INET6/etc., it belongs to and since the sk_buff structure does not store this information we need to pass along the address family separate from the packet itself. ---

[RFC PATCH v6 11/13] SELinux: allow NetLabel to directly cache SIDs

2007-11-09 Thread Paul Moore
Now that the SELinux NetLabel base SID is always the netmsg initial SID we can do a big optimization - caching the SID and not just the MLS attributes. This not only saves a lot of per-packet memory allocations and copies but it has a nice side effect of removing a chunk of code. ---

[RFC PATCH v6 09/13] SELinux: Better integration between peer labeling subsystems

2007-11-09 Thread Paul Moore
Rename the existing selinux_skb_extlbl_sid() function to selinux_skb_peerlbl_sid() and modify it's behavior such that it now reconciles multiple peer/external labels and if reconciliation is not possible it returns an error to the caller. --- security/selinux/hooks.c| 94

Re: [RFC PATCH v6 05/13] SELinux: add secctx_to_secid() LSM hook

2007-11-09 Thread Paul Moore
On Friday 09 November 2007 5:19:02 pm Casey Schaufler wrote: --- Paul Moore [EMAIL PROTECTED] wrote: Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. I'll bite. Where does this get used? Patch 12/13, functions netlbl_unlabel_staticadd

Re: [RFC PATCH v6 08/13] SELinux: Add new peer permissions to the Flask definitions

2007-11-12 Thread Paul Moore
On Sunday 11 November 2007 5:31:44 pm James Morris wrote: On Fri, 9 Nov 2007, Paul Moore wrote: Add additional Flask definitions to support the new peer object class. Should this be dependent on dynamic class/permission support? I think it's okay to _define_ the Flask definitions regardless

Re: [RFC PATCH v6 09/13] SELinux: Better integration between peer labeling subsystems

2007-11-12 Thread Paul Moore
On Sunday 11 November 2007 5:34:27 pm James Morris wrote: On Fri, 9 Nov 2007, Paul Moore wrote: + /* Between selinux_compat_net and selinux_policycap_netpeer this is +* starting to get a bit messy - we need to setup a timetable for +* deprecating some of this old/obsolete

[RFC PATCH v7 05/13] SELinux: add secctx_to_secid() LSM hook

2007-11-15 Thread Paul Moore
Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes a SELinux implementation for this hook. --- include/linux/security.h | 13 + security/dummy.c |6 ++ security/security.c |6 ++

[RFC PATCH v7 08/13] SELinux: Add new peer permissions to the Flask definitions

2007-11-15 Thread Paul Moore
Add additional Flask definitions to support the new peer object class. --- security/selinux/include/av_perm_to_string.h |3 +++ security/selinux/include/av_permissions.h|3 +++ security/selinux/include/class_to_string.h |7 +++ security/selinux/include/flask.h |

[RFC PATCH v7 03/13] NetLabel: consolidate the LSM domain mapping/hashing locks

2007-11-15 Thread Paul Moore
Currently we use two separate spinlocks to protect both the hash/mapping table and the default entry. This could be considered a bit foolish because it adds complexity without offering any real performance advantage. This patch removes the dedicated default spinlock and protects the default

[RFC PATCH v7 00/13] Labeled networking patches for 2.6.25

2007-11-15 Thread Paul Moore
are playing with this code I recommend you update to r50 to get the latest bits. As usual, if you have any comments/bug-reports/questions let me know. -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL

[RFC PATCH v7 01/13] NetLabel: remove unneeded RCU read locks

2007-11-15 Thread Paul Moore
This patch removes some unneeded RCU read locks as we can treat the reads as safe even without RCU. It also converts the NetLabel configuration refcount from a spinlock protected u32 into atomic_t to be more consistent with the rest of the kernel. --- net/netlabel/netlabel_cipso_v4.c |5

[RFC PATCH v7 02/13] NetLabel: cleanup the LSM domain hash functions

2007-11-15 Thread Paul Moore
The NetLabel/LSM domain hash table search function used a argument to specify if the default entry should be returned if an exact match couldn't be found in the hash table. This is a bit against the kernel's style so make two separate functions to represent the separate behaviors. ---

[RFC PATCH v7 04/13] NetLabel: Add secid token support to the NetLabel secattr struct

2007-11-15 Thread Paul Moore
This patch adds support to the NetLabel LSM secattr struct for a secid token and a type field, paving the way for full LSM/SELinux context support and static or fallback labels. In addition, this patch adds a fair amount of documentation to the core NetLabel structures used as part of the

[RFC PATCH v7 13/13] NetLabel: add auditing to the static labeling mechanism

2007-11-15 Thread Paul Moore
This patch adds auditing support to the NetLabel static labeling mechanism. --- include/linux/audit.h |2 + net/netlabel/netlabel_unlabeled.c | 127 +++-- 2 files changed, 107 insertions(+), 22 deletions(-) diff --git a/include/linux/audit.h

[RFC PATCH v7 09/13] SELinux: Better integration between peer labeling subsystems

2007-11-15 Thread Paul Moore
Rework the handling of network peer labels so that the different peer labeling subsystems work better together. This includes moving both subsystems to a single peer object class which involves not only changes to the permission checks but an improved method of consolidating multiple packet peer

[RFC PATCH v7 07/13] SELinux: Add a capabilities bitmap to SELinux policy version 22

2007-11-15 Thread Paul Moore
Add a new policy capabilities bitmap to SELinux policy version 22. This bitmap will enable the security server to query the policy to determine which features it supports. --- security/selinux/Kconfig|2 - security/selinux/include/security.h | 15 ++

[RFC PATCH v7 06/13] NetLabel: add IP address family information to the netlbl_skbuff_getattr() function

2007-11-15 Thread Paul Moore
In order to do any sort of IP header inspection of incoming packets we need to know which address family, AF_INET/AF_INET6/etc., it belongs to and since the sk_buff structure does not store this information we need to pass along the address family separate from the packet itself. ---

[RFC PATCH v7 12/13] NetLabel: introduce static network labels for unlabeled connections

2007-11-15 Thread Paul Moore
Most trusted OSs, with the exception of Linux, have the ability to specify static security labels for unlabeled networks. This patch adds this ability to the NetLabel packet labeling framework. If the NetLabel subsystem is called to determine the security attributes of an incoming packet it

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-17 Thread Paul Moore
On Friday 16 November 2007 10:45:32 pm Tetsuo Handa wrote: Paul Moore wrote: I might be missing something here, but why do you need to do a skb_peek() again? You already have the skb and the sock, just do the unlink. The skb might be already dequeued by other thread while I slept inside

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread Paul Moore
On Saturday 17 November 2007 11:00:20 pm Tetsuo Handa wrote: Hello. Hello. Paul Moore wrote: Okay, well if that is the case I think you are going to have another problem in that you could end up throwing away skbs that haven't been through your security_post_recv_datagram() hook because

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread Paul Moore
On Monday 19 November 2007 9:29:52 am Tetsuo Handa wrote: Paul Moore wrote: If that is the case then the second call to skb_peek() will return a different skb then the one you passed to security_post_recv_datagram(). Yes. The second call to skb_peek() might return a different skb than

[RFC PATCH v8 05/18] LSM: Add secctx_to_secid() LSM hook

2007-12-14 Thread Paul Moore
Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. --- include/linux/security.h | 13 + security/dummy.c |6 ++ security/security.c |6 ++

[RFC PATCH v8 09/18] SELinux: Only store the network interface's ifindex

2007-12-14 Thread Paul Moore
Instead of storing the packet's network interface name store the ifindex. This allows us to defer the need to lookup the net_device structure until the audit record is generated meaning that in the majority of cases we never need to bother with this at all. --- security/selinux/avc.c |

[RFC PATCH v8 12/18] SELinux: Add new peer permissions to the Flask definitions

2007-12-14 Thread Paul Moore
Add additional Flask definitions to support the new peer object class. --- security/selinux/include/av_perm_to_string.h |3 +++ security/selinux/include/av_permissions.h|3 +++ security/selinux/include/class_to_string.h |7 +++ security/selinux/include/flask.h |

[RFC PATCH v8 02/18] NetLabel: Cleanup the LSM domain hash functions

2007-12-14 Thread Paul Moore
The NetLabel/LSM domain hash table search function used an argument to specify if the default entry should be returned if an exact match couldn't be found in the hash table. This is a bit against the kernel's style so make two separate functions to represent the separate behaviors. ---

[RFC PATCH v8 15/18] SELinux: Allow NetLabel to directly cache SIDs

2007-12-14 Thread Paul Moore
Now that the SELinux NetLabel base SID is always the netmsg initial SID we can do a big optimization - caching the SID and not just the MLS attributes. This not only saves a lot of per-packet memory allocations and copies but it has a nice side effect of removing a chunk of code. ---

[RFC PATCH v8 17/18] NetLabel: Add auditing to the static labeling mechanism

2007-12-14 Thread Paul Moore
This patch adds auditing support to the NetLabel static labeling mechanism. --- include/linux/audit.h |2 net/netlabel/netlabel_unlabeled.c | 207 ++--- 2 files changed, 195 insertions(+), 14 deletions(-) diff --git a/include/linux/audit.h

[RFC PATCH v8 04/18] NetLabel: Add secid token support to the NetLabel secattr struct

2007-12-14 Thread Paul Moore
This patch adds support to the NetLabel LSM secattr struct for a secid token and a type field, paving the way for full LSM/SELinux context support and static or fallback labels. In addition, this patch adds a fair amount of documentation to the core NetLabel structures used as part of the

[RFC PATCH v8 01/18] NetLabel: Remove unneeded RCU read locks

2007-12-14 Thread Paul Moore
This patch removes some unneeded RCU read locks as we can treat the reads as safe even without RCU. It also converts the NetLabel configuration refcount from a spinlock protected u32 into atomic_t to be more consistent with the rest of the kernel. --- net/netlabel/netlabel_cipso_v4.c |5

[RFC PATCH v8 03/18] NetLabel: Consolidate the LSM domain mapping/hashing locks

2007-12-14 Thread Paul Moore
Currently we use two separate spinlocks to protect both the hash/mapping table and the default entry. This could be considered a bit foolish because it adds complexity without offering any real performance advantage. This patch removes the dedicated default spinlock and protects the default

[RFC PATCH v8 16/18] NetLabel: Introduce static network labels for unlabeled connections

2007-12-14 Thread Paul Moore
Most trusted OSs, with the exception of Linux, have the ability to specify static security labels for unlabeled networks. This patch adds this ability to the NetLabel packet labeling framework. If the NetLabel subsystem is called to determine the security attributes of an incoming packet it

[RFC PATCH v8 11/18] SELinux: Add a capabilities bitmap to SELinux policy version 22

2007-12-14 Thread Paul Moore
Add a new policy capabilities bitmap to SELinux policy version 22. This bitmap will enable the security server to query the policy to determine which features it supports. --- security/selinux/Kconfig|2 - security/selinux/include/security.h | 15 ++

[RFC PATCH v8 08/18] SELinux: Convert the netif code to use ifindex values

2007-12-14 Thread Paul Moore
) 2003 Red Hat, Inc., James Morris [EMAIL PROTECTED] + * Copyright (C) 2007 Hewlett-Packard Development Company, L.P. + *Paul Moore, [EMAIL PROTECTED] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License

[RFC PATCH v8 13/18] SELinux: Better integration between peer labeling subsystems

2007-12-14 Thread Paul Moore
Rework the handling of network peer labels so that the different peer labeling subsystems work better together. This includes moving both subsystems to a single peer object class which involves not only changes to the permission checks but an improved method of consolidating multiple packet peer

[RFC PATCH v8 00/18] Update to the labeled networking patches for 2.6.25

2007-12-14 Thread Paul Moore
patches out next week to help enable the new functionality and if everything is still looking okay I'll ping Andew Morton to see if I can get the latest version of these patches included in the -mm tree (previous versions are already included). Thanks. -- paul moore linux security @ hp

[RFC PATCH v8 06/18] LSM: Add inet_sys_snd_skb() LSM hook

2007-12-14 Thread Paul Moore
Add an inet_sys_snd_skb() LSM hook to allow the LSM to provide packet level access control for all outbound packets. Using the existing postroute_last netfilter hook turns out to be problematic as it is can be invoked multiple times for a single packet, e.g. individual IPsec transforms, adding

[RFC PATCH v8 07/18] NetLabel: Add IP address family information to the netlbl_skbuff_getattr() function

2007-12-14 Thread Paul Moore
In order to do any sort of IP header inspection of incoming packets we need to know which address family, AF_INET/AF_INET6/etc., it belongs to and since the sk_buff structure does not store this information we need to pass along the address family separate from the packet itself. ---

[RFC PATCH v8 14/18] SELinux: Enable dynamic enable/disable of the network access checks

2007-12-14 Thread Paul Moore
This patch introduces a mechanism for checking when labeled IPsec or SECMARK are in use by keeping introducing a configuration reference counter for each subsystem. In the case of labeled IPsec, whenever a labeled SA or SPD entry is created the labeled IPsec/XFRM reference count is increased and

Re: [RFC PATCH v8 18/18] SELinux: Add network ingress and egress control permission checks

2007-12-16 Thread Paul Moore
On Friday 14 December 2007 4:51:29 pm Paul Moore wrote: This patch implements packet ingress/egress controls for SELinux which allow SELinux security policy to control the flow of all IPv4 and IPv6 packets into and out of the system. Currently SELinux does not have proper control over

Re: [RFC PATCH v8 06/18] LSM: Add inet_sys_snd_skb() LSM hook

2007-12-17 Thread Paul Moore
On Monday 17 December 2007 2:45:50 pm Stephen Smalley wrote: On Fri, 2007-12-14 at 16:50 -0500, Paul Moore wrote: Add an inet_sys_snd_skb() LSM hook to allow the LSM to provide packet level access control for all outbound packets. Using the existing postroute_last netfilter hook turns out

Re: [RFC PATCH v8 09/18] SELinux: Only store the network interface's ifindex

2007-12-17 Thread Paul Moore
On Monday 17 December 2007 2:56:41 pm Stephen Smalley wrote: On Fri, 2007-12-14 at 16:50 -0500, Paul Moore wrote: /* Initialize an AVC audit data structure. */ #define AVC_AUDIT_DATA_INIT(_d,_t) \ -{ memset((_d), 0, sizeof(struct avc_audit_data)); (_d)-type = AVC_AUDIT_DATA_##_t

Re: [RFC PATCH v8 10/18] SELinux: Add a network node caching mechanism similar to the sel_netif_*() functions

2007-12-17 Thread Paul Moore
On Monday 17 December 2007 3:35:28 pm Stephen Smalley wrote: On Fri, 2007-12-14 at 16:50 -0500, Paul Moore wrote: This patch adds a SELinux IP address/node SID caching mechanism similar to the sel_netif_*() functions. The node SID queries in the SELinux hooks files are also modified

Re: [RFC PATCH v8 18/18] SELinux: Add network ingress and egress control permission checks

2007-12-17 Thread Paul Moore
On Monday 17 December 2007 3:05:37 pm Stephen Smalley wrote: On Sun, 2007-12-16 at 11:47 -0500, Paul Moore wrote: On Friday 14 December 2007 4:51:29 pm Paul Moore wrote: This patch implements packet ingress/egress controls for SELinux which allow SELinux security policy to control

Re: [RFC PATCH v8 05/18] LSM: Add secctx_to_secid() LSM hook

2007-12-18 Thread Paul Moore
On Tuesday 18 December 2007 3:25:54 am James Morris wrote: On Fri, 14 Dec 2007, Paul Moore wrote: Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. Please sign off your patches

Re: [RFC PATCH v8 18/18] SELinux: Add network ingress and egress control permission checks

2007-12-18 Thread Paul Moore
On Monday 17 December 2007 3:05:37 pm Stephen Smalley wrote: On Sun, 2007-12-16 at 11:47 -0500, Paul Moore wrote: We should probably have different permissions for the interface and node cases. Take the example of an admin who is only interested in enforcing interface controls and not node

Re: [RFC PATCH v8 18/18] SELinux: Add network ingress and egress control permission checks

2007-12-18 Thread Paul Moore
On Tuesday 18 December 2007 10:14:41 am Stephen Smalley wrote: On Tue, 2007-12-18 at 08:59 -0500, Paul Moore wrote: Thoughts? Should I just forget all this and use the peer label as a subject label? I'm not certain what we gain by using the peer as the object and class in these checks

[RFC PATCH v9 18/18] SELinux: Add network ingress and egress control permission checks

2007-12-21 Thread Paul Moore
thanks to Venkat Yekkirala [EMAIL PROTECTED] whose earlier work on this topic eventually led to this patch. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/hooks.c | 347 -- 1 files changed, 240 insertions(+), 107 deletions(-) diff

[RFC PATCH v9 08/18] SELinux: Convert the netif code to use ifindex values

2007-12-21 Thread Paul Moore
removes the default message SID from the network interface record, it is not being used and therefore is dead code. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/hooks.c|4 - security/selinux/include/netif.h|4 - security/selinux/include/objsec.h |5

[RFC PATCH v9 04/18] NetLabel: Add secid token support to the NetLabel secattr struct

2007-12-21 Thread Paul Moore
of the NetLabel kernel API. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h| 91 ++--- net/ipv4/cipso_ipv4.c | 59 +++- net/netlabel/netlabel_unlabeled.c |1 security/selinux/ss/mls.c | 10

[RFC PATCH v9 07/18] NetLabel: Add IP address family information to the netlbl_skbuff_getattr() function

2007-12-21 Thread Paul Moore
-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h |2 ++ net/netlabel/netlabel_kapi.c|2 ++ security/selinux/hooks.c| 33 ++--- security/selinux/include/netlabel.h |8 +++- security/selinux/netlabel.c

[RFC PATCH v9 01/18] NetLabel: Remove unneeded RCU read locks

2007-12-21 Thread Paul Moore
This patch removes some unneeded RCU read locks as we can treat the reads as safe even without RCU. It also converts the NetLabel configuration refcount from a spinlock protected u32 into atomic_t to be more consistent with the rest of the kernel. Signed-off-by: Paul Moore [EMAIL PROTECTED

[RFC PATCH v9 06/18] LSM: Add inet_sys_snd_skb() LSM hook

2007-12-21 Thread Paul Moore
unwanted overhead and complicating the security policy. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/linux/security.h | 11 +++ net/ipv4/ip_output.c |7 +++ net/ipv6/ip6_output.c|5 + security/dummy.c |8 +++- security/security.c

[RFC PATCH v9 00/18] Labeled networking patches for 2.6.25 (against 2.6.24-rc6)

2007-12-21 Thread Paul Moore
available here: * git://git.infradead.org/users/pcmoore/lblnet-2.6_testing -- paul moore linux security @ hp - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo

[RFC PATCH v9 05/18] LSM: Add secctx_to_secid() LSM hook

2007-12-21 Thread Paul Moore
Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. Signed-off-by: Paul Moore [EMAIL PROTECTED] Acked-by: Stephen Smalley [EMAIL PROTECTED] --- include/linux/security.h | 13

[RFC PATCH v9 12/18] SELinux: Add a new peer class and permissions to the Flask definitions

2007-12-21 Thread Paul Moore
Add additional Flask definitions to support the new peer object class and additional permissions to the netif and node object classes. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/include/av_perm_to_string.h |5 + security/selinux/include/av_permissions.h|5

[RFC PATCH v9 09/18] SELinux: Only store the network interface's ifindex

2007-12-21 Thread Paul Moore
Instead of storing the packet's network interface name store the ifindex. This allows us to defer the need to lookup the net_device structure until the audit record is generated meaning that in the majority of cases we never need to bother with this at all. Signed-off-by: Paul Moore [EMAIL

[RFC PATCH v9 17/18] NetLabel: Add auditing to the static labeling mechanism

2007-12-21 Thread Paul Moore
This patch adds auditing support to the NetLabel static labeling mechanism. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/linux/audit.h |2 net/netlabel/netlabel_unlabeled.c | 207 ++--- 2 files changed, 195 insertions(+), 14 deletions

Re: [RFC PATCH v9 12/18] SELinux: Add a new peer class and permissions to the Flask definitions

2007-12-21 Thread Paul Moore
On Friday 21 December 2007 12:36:15 pm Stephen Smalley wrote: On Fri, 2007-12-21 at 12:09 -0500, Paul Moore wrote: Add additional Flask definitions to support the new peer object class and additional permissions to the netif and node object classes. Signed-off-by: Paul Moore [EMAIL

[RFC PATCH v10 00/20] Labeled networking changes for 2.6.25

2008-01-03 Thread Paul Moore
to Valdis for reporting the problem over the holidays. In order to help spot similar problems in the future I added some warning messages to the SELinux network code to eliminate these silent drops. If you are run into any problems or have any comments please let me know. Thanks. -- paul moore

[RFC PATCH v10 02/20] NetLabel: Cleanup the LSM domain hash functions

2008-01-03 Thread Paul Moore
-by: Paul Moore [EMAIL PROTECTED] --- net/netlabel/netlabel_domainhash.c | 47 ++-- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index b3675bd..1f8f7ac 100644 --- a/net

[RFC PATCH v10 03/20] NetLabel: Consolidate the LSM domain mapping/hashing locks

2008-01-03 Thread Paul Moore
entry with the hash/mapping table spinlock. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- net/netlabel/netlabel_domainhash.c | 30 +- 1 files changed, 9 insertions(+), 21 deletions(-) diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel

[RFC PATCH v10 04/20] NetLabel: Add secid token support to the NetLabel secattr struct

2008-01-03 Thread Paul Moore
of the NetLabel kernel API. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h| 91 ++--- net/ipv4/cipso_ipv4.c | 59 +++- net/netlabel/netlabel_unlabeled.c |1 security/selinux/ss/mls.c | 10

[RFC PATCH v10 05/20] LSM: Add secctx_to_secid() LSM hook

2008-01-03 Thread Paul Moore
Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. Signed-off-by: Paul Moore [EMAIL PROTECTED] Acked-by: Stephen Smalley [EMAIL PROTECTED] --- include/linux/security.h | 13

[RFC PATCH v10 06/20] LSM: Add inet_sys_snd_skb() LSM hook

2008-01-03 Thread Paul Moore
unwanted overhead and complicating the security policy. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/linux/security.h | 11 +++ net/ipv4/ip_output.c |7 +++ net/ipv6/ip6_output.c|5 + security/dummy.c |8 +++- security/security.c

[RFC PATCH v10 07/20] NetLabel: Add IP address family information to the netlbl_skbuff_getattr() function

2008-01-03 Thread Paul Moore
-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h |2 ++ net/netlabel/netlabel_kapi.c|2 ++ security/selinux/hooks.c| 33 ++--- security/selinux/include/netlabel.h |8 +++- security/selinux/netlabel.c

[RFC PATCH v10 08/20] NET: Clone the sk_buff 'iif' field in __skb_clone()

2008-01-03 Thread Paul Moore
back through the network stack. This patch corrects this problem by properly copying the 'iif' field in __skb_clone() and removing the 'iif' field assignment from skb_act_clone() since it is no longer needed. Also, while we are here, get rid of that silly C() macro. Signed-off-by: Paul Moore

[RFC PATCH v10 10/20] SELinux: Only store the network interface's ifindex

2008-01-03 Thread Paul Moore
Instead of storing the packet's network interface name store the ifindex. This allows us to defer the need to lookup the net_device structure until the audit record is generated meaning that in the majority of cases we never need to bother with this at all. Signed-off-by: Paul Moore [EMAIL

[RFC PATCH v10 12/20] SELinux: Add a capabilities bitmap to SELinux policy version 22

2008-01-03 Thread Paul Moore
Add a new policy capabilities bitmap to SELinux policy version 22. This bitmap will enable the security server to query the policy to determine which features it supports. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/Kconfig|2 - security/selinux/include

[RFC PATCH v10 13/20] SELinux: Add a new peer class and permissions to the Flask definitions

2008-01-03 Thread Paul Moore
Add additional Flask definitions to support the new peer object class and additional permissions to the netif and node object classes. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/include/av_perm_to_string.h |5 + security/selinux/include/av_permissions.h|5

[RFC PATCH v10 14/20] SELinux: Better integration between peer labeling subsystems

2008-01-03 Thread Paul Moore
labels. As part of this work the inbound packet permission check code has been heavily modified to handle both the old and new behavior in as sane a fashion as possible. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/hooks.c| 204

[RFC PATCH v10 15/20] SELinux: Enable dynamic enable/disable of the network access checks

2008-01-03 Thread Paul Moore
is not the case. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/linux/selinux.h | 45 +++--- net/netfilter/xt_SECMARK.c | 13 ++- security/selinux/exports.c | 20 +++-- security/selinux/hooks.c| 46

[RFC PATCH v10 17/20] NetLabel: Introduce static network labels for unlabeled connections

2008-01-03 Thread Paul Moore
the netlabel_tools package. The matching security label is returned to the caller just as if the packet was explicitly labeled using a labeling protocol. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h|6 net/netlabel/netlabel_kapi.c | 16 net/netlabel

[RFC PATCH v10 16/20] SELinux: Allow NetLabel to directly cache SIDs

2008-01-03 Thread Paul Moore
-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/hooks.c|6 -- security/selinux/include/netlabel.h |2 - security/selinux/include/security.h |2 - security/selinux/netlabel.c | 55 ++-- security/selinux/ss/services.c | 124

Re: [PATCH 08/26] Add a secctx_to_secid() LSM hook to go along with the existing

2008-01-16 Thread Paul Moore
On Wednesday 16 January 2008 5:13:53 pm James Morris wrote: On Wed, 16 Jan 2008, Paul Moore wrote: On Tuesday 15 January 2008 8:05:27 pm James Morris wrote: On Tue, 15 Jan 2008, David Howells wrote: secid_to_secctx() LSM hook. This patch also includes the SELinux implementation

[RFC PATCH v12 17/18] SELinux: Add network ingress and egress control permission checks

2008-01-17 Thread Paul Moore
thanks to Venkat Yekkirala [EMAIL PROTECTED] whose earlier work on this topic eventually led to this patch. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/hooks.c | 402 -- 1 files changed, 280 insertions(+), 122 deletions(-) diff

[RFC PATCH v12 16/18] NetLabel: Add auditing to the static labeling mechanism

2008-01-17 Thread Paul Moore
This patch adds auditing support to the NetLabel static labeling mechanism. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/linux/audit.h |2 net/netlabel/netlabel_unlabeled.c | 207 ++--- 2 files changed, 195 insertions(+), 14 deletions

[RFC PATCH v12 15/18] NetLabel: Introduce static network labels for unlabeled connections

2008-01-17 Thread Paul Moore
the netlabel_tools package. The matching security label is returned to the caller just as if the packet was explicitly labeled using a labeling protocol. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- include/net/netlabel.h|6 net/netlabel/netlabel_kapi.c | 16 net/netlabel

[RFC PATCH v12 11/18] SELinux: Add a new peer class and permissions to the Flask definitions

2008-01-17 Thread Paul Moore
. Signed-off-by: Paul Moore [EMAIL PROTECTED] --- security/selinux/include/av_perm_to_string.h |9 + security/selinux/include/av_permissions.h|9 + security/selinux/include/class_to_string.h |7 +++ security/selinux/include/flask.h |1 + 4 files

[RFC PATCH v12 08/18] SELinux: Only store the network interface's ifindex

2008-01-17 Thread Paul Moore
Instead of storing the packet's network interface name store the ifindex. This allows us to defer the need to lookup the net_device structure until the audit record is generated meaning that in the majority of cases we never need to bother with this at all. Signed-off-by: Paul Moore [EMAIL

  1   2   >