All of lore.kernel.org
 help / color / mirror / Atom feed
* DOCUMENTATION OF SECID RECONCILIATION AND FLOW CONTROL FOR POLICY WRITERS
@ 2006-10-09 12:24 Venkat Yekkirala
  2006-10-09 19:26 ` Venkat Yekkirala
  2006-10-13 20:55 ` Christopher J. PeBenito
  0 siblings, 2 replies; 6+ messages in thread
From: Venkat Yekkirala @ 2006-10-09 12:24 UTC (permalink / raw)
  To: selinux, redhat-lspp

DOCUMENTATION OF SECID RECONCILIATION AND FLOW CONTROL FOR POLICY WRITERS:

ON INBOUND:

1. PACKETS ENTERING SYSTEM FROM A NON-LOOPBACK DEVICE:

   Can a packet "carrying" external domain label x_t "flow_in" thru the
   security point with the peer domain label p_d_t?

	NOTE:
	a. x_t defaults to unlabeled_t, if no external label.
	b. p_d_t defaults to network_t in the absence of any applicable
	   [conn]secmark rules for the packet. If there are multiple
	   secmark rules applicable to a packet, the context on the LAST
	   rule will apply.

   NO: Drop packet.
   YES: If no external label, let packet "carry" p_d_t.

2. INPUT ONLY: Can a socket "recv" a packet from domain p_d_t?

   NO: Drop packet.
   YES: If setting up a tcp connection, set peer context to p_d_t.

ON OUTBOUND:

1. Let packet "carry" the originating socket domain label.

2. IPSEC Handling:

   LABELED IPSEC: If packet "polmatch"es to an otherwise applicable and
   labeled SPD entry, choose a Security Association (SA) with the SAME context
   as the domain label being carried by packet.
	NOTE: If no such SA present, call into IKE with context on packet.

   NON-LABELED (PLAIN/TRADITIONAL) IPSEC: If there's an applicable SPD entry
   that does NOT have an explicit context associated with it, an applicable SA
   that does NOT have an explicit context associated with it is chosen.
	NOTE: If no such SA present, call into IKE, but with NO context.

3. PACKETS DESTINED FOR NON-LOOPBACK DEVICE:

   a. IPTABLES Processing:
      As EACH applicable iptables [CONN]SECMARK rule with domain p_d_t is
      encountered, do the following:
   
      Can a packet carrying domain label a_t "flow_out" of the security point
      with the domain label p_d_t?
   
         NO: Drop packet.
         YES: Replace the domain label a_t on the packet with the security point
              label p_d_t.

   b. Before a packet is let out of the system:

      Can a packet with domain label p_d_t "flow_out" into the network domain
      network_t?

      NO: Drop packet.
      YES: Let packet out.

      NOTE: Ideally this check should be applicable only to packets that
            didn't go thru [conn]secmark checks for outbound, but there's
            currently no way to know this due to implementation constrains.
            Hence a blanket check for ALL packets leaving the system.


FORWARDED TRAFFIC:

Forwarded Traffic will undergo the following:

1. Step 1 under ON INBOUND.

2. Steps 2 and 3 under ON OUTBOUND.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: DOCUMENTATION OF SECID RECONCILIATION AND FLOW CONTROL FOR POLICY WRITERS
@ 2006-10-14  0:03 Venkat Yekkirala
  0 siblings, 0 replies; 6+ messages in thread
From: Venkat Yekkirala @ 2006-10-14  0:03 UTC (permalink / raw)
  To: Venkat Yekkirala, 'Christopher J. PeBenito'; +Cc: selinux, redhat-lspp

> > turns into:
> > 
> > allow unlabeled_t network_t:packet flow_in;
> 
> as it happens currently.
> 
> > allow unconfined_t unlabeled_t:packet flow_in;
> 
> as it happens currently.

Well, as: allow unconfined_t unlabeled_t:packet recv;

> 
> > allow unconfined_t unlabeled_t:packet flow_out;
> 
> Not needed since we have a check against network_t
> as mentioned next.
> 
> > allow unlabeled_t network_t:packet flow_out;
> > 
> > which seems more correct to me and is clearer and more consistent.
> 
> which, after all said and done is what in fact is (should be) 
> happening.
> 
> But the fights in the earlier part still hold true, which 
> makes me wonder
> where did you/I get off the track?
> 

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

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

end of thread, other threads:[~2006-10-14  0:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 12:24 DOCUMENTATION OF SECID RECONCILIATION AND FLOW CONTROL FOR POLICY WRITERS Venkat Yekkirala
2006-10-09 19:26 ` Venkat Yekkirala
2006-10-13 23:23   ` Venkat Yekkirala
2006-10-13 20:55 ` Christopher J. PeBenito
2006-10-13 23:58   ` Venkat Yekkirala
  -- strict thread matches above, loose matches on Subject: below --
2006-10-14  0:03 Venkat Yekkirala

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.