From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Joy Latten <latten@austin.ibm.com>
Cc: redhat-lspp@redhat.com, selinux@tycho.nsa.gov, jbrindle@tresys.com
Subject: Re: labeled ipsec policy
Date: Tue, 21 Nov 2006 09:10:02 -0500 [thread overview]
Message-ID: <1164118202.12234.24.camel@sgc> (raw)
In-Reply-To: <1163802623.17737.398.camel@faith.austin.ibm.com>
On Fri, 2006-11-17 at 16:30 -0600, Joy Latten wrote:
> The following policy enables labeled ipsec to run
> in enforcing mode. I configure labeled ipsec in sysadm_r role.
> Thus the rules I needed were specific to this role.
[cut]
> Included are some interfaces, which I used in an xxxx.if
> file. Then, there are a bunch of rules which I used in a xxxx.te file
> These rules were just an example of what I needed
> to get ping, nc, and ssh to work with labeled ipsec. For my
> policy, I used the types unlabeled_t, passwd_t, and ipsec_spd_t.
> When using passwd_t, ipsec_spd_t or any other domain, please be
> mindful of mls constraints.
[cut]
> interface(`ipsec_set_label',`
> gen_require(`
> type sysadm_t;
> ')
>
> allow sysadm_t $1:association setcontext;
> ')
Interfaces are written from the perspective of the subject (except for a
few very specific cases), so the parameter should be the subject, not
the object. Neglecting that, is this for sysadm_t instead of
ipsec_mgmt_t? I suspect that we want to add an interface to the domain
module that allows setcontext on the domain attribute.
> interface(`ipsec_label_sa_pol',`
> allow $1 $2:association polmatch;
> ')
Generally refpolicy would leave this as a raw rule these types are in
separate modules, in which case the interface would be in $2's module
and have a specific type instead of $2.
> interface(`ipsec_labels_send_recv',`
> allow $1 self:association { recvfrom sendto };
> ')
This would be raw rule in refpolicy instead of an interface.
> interface(`ipsec_tools_utilities',`
> gen_require(`
> type isakmp_port_t;
> type inaddr_any_node_t;
> ')
>
> # allow setkey and racoon to create and use a key socket.
> allow $1 self:key_socket { create read write setopt };
>
> # allow racoon to use ISAKMP port
> allow $1 isakmp_port_t:udp_socket name_bind;
>
> # allow racoon to use avc_has_perm in within_range()
> # to determine if proposed SA "polmatches" to policy
> allow $1 self:netlink_selinux_socket { bind create read };
>
> # I think this is so racoon can listen on an admin port.
> allow $1 inaddr_any_node_t:tcp_socket node_bind;
>
> # to create, remove read lock in /var/racoon/
> ipsec_manage_pid($1)
>
> # in grabmyaddrs() socket(PF_ROUTE...)
> allow $1 self:netlink_route_socket { create_netlink_socket_perms };
> ')
Again, why is this needed, instead of ipsec_mgmt_t?
I suspect that the ipsec policy needs to be overhauled because I believe
it was oriented towards the KAME ipsec implementation (pluto, et al) and
was augmented to work with racoon afterwards.
--
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
--
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-11-21 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 22:30 labeled ipsec policy Joy Latten
[not found] ` <200611201000.06118.pcmoore@engin.umich.edu>
2006-11-20 15:09 ` [redhat-lspp] " Joy Latten
2006-11-20 16:24 ` Paul Moore
2006-11-20 16:34 ` Casey Schaufler
2006-11-21 14:10 ` Christopher J. PeBenito [this message]
2006-11-27 20:51 ` [redhat-lspp] " Joy Latten
2006-11-29 14:59 ` Christopher J. PeBenito
2006-11-29 20:42 ` Venkat Yekkirala
2006-11-29 23:51 ` Joy Latten
2006-11-30 15:57 ` Venkat Yekkirala
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=1164118202.12234.24.camel@sgc \
--to=cpebenito@tresys.com \
--cc=jbrindle@tresys.com \
--cc=latten@austin.ibm.com \
--cc=redhat-lspp@redhat.com \
--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 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.