public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys•com>
To: Paul Moore <paul.moore@hp•com>
Cc: Venkat Yekkirala <vyekkirala@TrustedCS•com>,
	netdev@vger•kernel.org, selinux@tycho•nsa.gov, jmorris@namei•org,
	sds@tycho•nsa.gov, eparis@redhat•com
Subject: Re: [PATCH 1/1] secid reconcialiation: Replace unlabeled_t with the network_t
Date: Wed, 04 Oct 2006 10:47:34 -0400	[thread overview]
Message-ID: <1159973254.14831.71.camel@sgc> (raw)
In-Reply-To: <4523C655.7010008@hp.com>

On Wed, 2006-10-04 at 10:33 -0400, Paul Moore wrote:
> Venkat Yekkirala wrote:
> > The following replaces unlabeled_t with network_t for
> > better characterization of the flow out/in checks in
> > SELinux, as well as to allow for mls packets to
> > flow out/in from the network since network_t would allow
> > the full range of MLS labels, as opposed to the unlabeled init sid
> > that only allows system-hi.
> > 
> > Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS•com>
> > ---
> > This is an incremental patch the secid-reconcilation v4 patchset.
> > 
> > --- net-2.6.sid3/security/selinux/hooks.c	2006-10-01 15:43:12.000000000 -0500
> > +++ net-2.6/security/selinux/hooks.c	2006-10-03 16:43:21.000000000 -0500
> > @@ -3703,7 +3703,8 @@ static int selinux_skb_flow_in(struct sk
> >  	err = selinux_xfrm_decode_session(skb, &xfrm_sid, 0);
> >  	BUG_ON(err);
> >  
> > -	err = avc_has_perm(xfrm_sid, skb->secmark, SECCLASS_PACKET,
> > +	err = avc_has_perm(xfrm_sid, skb->secmark? : SECINITSID_NETMSG,
> > +					SECCLASS_PACKET,
> >  					PACKET__FLOW_IN, NULL);
> >  	if (err)
> >  		goto out;
> > @@ -3900,7 +3901,7 @@ static unsigned int selinux_ip_postroute
> >  				skb->secmark = sksec->sid;
> >  			}
> >  		}
> > -		err = avc_has_perm(skb->secmark, SECINITSID_UNLABELED,
> > +		err = avc_has_perm(skb->secmark, SECINITSID_NETMSG,
> >  				   SECCLASS_PACKET, PACKET__FLOW_OUT, &ad);
> >  	}
> >  out:
> 
> Considering the above change, I wonder if it would also make sense to
> update the secmark to SECINITSID_UNLABELED in the abscence of any
> external labeling (labeled IPsec or NetLabel)?

Wouldn't that make secmark useless in the non labeled networking case?

-- 
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


  parent reply	other threads:[~2006-10-04 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04  2:41 [PATCH 1/1] secid reconcialiation: Replace unlabeled_t with the network_t Venkat Yekkirala
2006-10-04 14:33 ` Paul Moore
2006-10-04 14:43   ` Paul Moore
2006-10-04 14:47   ` Christopher J. PeBenito [this message]
2006-10-04 14:53     ` 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=1159973254.14831.71.camel@sgc \
    --to=cpebenito@tresys$(echo .)com \
    --cc=eparis@redhat$(echo .)com \
    --cc=jmorris@namei$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=paul.moore@hp$(echo .)com \
    --cc=sds@tycho$(echo .)nsa.gov \
    --cc=selinux@tycho$(echo .)nsa.gov \
    --cc=vyekkirala@TrustedCS$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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