All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Vermeulen <sven.vermeulen@siphos.be>
To: Chad Hanson <dahchanson@gmail.com>
Cc: Paul Moore <paul@paul-moore.com>, SELinux <selinux@tycho.nsa.gov>
Subject: Re: Labeled IPSec trying to match policy for peer label?
Date: Sat, 6 Jul 2013 21:21:47 +0200	[thread overview]
Message-ID: <20130706192147.GA23809@siphos.be> (raw)
In-Reply-To: <CAOFCXec9Lox=mkSpzmkF+LCsFBWVcRfL3E8u5yM4nYBHveORNA@mail.gmail.com>

On Sat, Jul 06, 2013 at 11:40:46AM -0400, Chad Hanson wrote:
> Are you running with MLS policy? I am curious since the last output
> showed: system_u:object_r:ipsec_spd_t:s0-s0:c0.c1023. I would expect
> the following SPD context for MLS:
> system_u:object_r:ipsec_spd_t:s0-s15:c0.c1023.  If not using MLS,  you
> would always fail in within_range()  at
> 
> if (!mls_ready)    /*mls may not be enabled */
>            return 0
> 
> There should be a log message at the startup of racoon if MLS is
> disabled. I didn't originally notice your original SPD context wasn't
> ranged: system_u:object_r:ipsec_spd_t:s0. This typically would be
> system_u:object_r:ipsec_spd_t:s0-s15:c0.c1023 on a MLS system.

I'm running an MLS-enabled policy (but its MCS, so only a single sensitivity
level but multiple categories). I was thinking about the range as well, but
that doesn't seem to help.

Right now, my spdadd statements include the c0.c1023 range, and I'm trying
to generate communication through both a s0:c0.c1023-ranged process as well as
"just" s0 to see what happens. Still no luck.

spdadd 10.1.2.0/24 10.1.3.0/24 any -ctx 1 1
  "system_u:object_r:ipsec_spd_t:s0-s0:c0.c1023" -P out ipsec
  esp/tunnel/192.168.100.152-192.168.100.153/require;

spdadd 10.1.3.0/24 10.1.2.0/24 any -ctx 1 1
  "system_u:object_r:ipsec_spd_t:s0-s0:c0.c1023" -P in ipsec
  esp/tunnel/192.168.100.153-192.168.100.152/require;

There is no logging related to MLS.

I also changed SELinux from enforcing to permissive but that didn't change
the behavior here. I'm going to start inserting the necessary print
statements in the code to see when (and why) the association isn't set up.

Wkr,
	Sven Vermeulen

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

  reply	other threads:[~2013-07-06 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 18:39 Labeled IPSec trying to match policy for peer label? Sven Vermeulen
2013-07-05 20:50 ` Paul Moore
2013-07-06  6:39   ` Sven Vermeulen
2013-07-06 12:41     ` Sven Vermeulen
2013-07-06 15:40       ` Chad Hanson
2013-07-06 19:21         ` Sven Vermeulen [this message]
2013-07-06 20:53           ` Joe Nall
2013-07-07  8:33           ` Labeled IPSec trying to match policy for peer label? (solved) Sven Vermeulen
2013-07-07 14:53             ` Chad Hanson

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=20130706192147.GA23809@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --cc=dahchanson@gmail.com \
    --cc=paul@paul-moore.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.