netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Paul Moore <paul.moore@hp.com>,
	netdev@vger.kernel.org, selinux@tycho.nsa.gov,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@redhat.com>,
	johnpol@2ka.mipt.ru, Herbert Xu <herbert@gondor.apana.org.au>
Subject: RE: [PATCH 1/3] Fix for IPsec leakage with SELinux enabled - V.03
Date: Thu, 5 Oct 2006 19:30:33 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0610051918080.26924@d.namei> (raw)
In-Reply-To: <36282A1733C57546BE392885C0618592015CFB62@chaos.tcs.tcs-sec.com>

On Thu, 5 Oct 2006, Venkat Yekkirala wrote:

> > > -		if (xfrm_policy_match(pol, fl, type, family, dir)) {
> > > +		err = xfrm_policy_match(pol, fl, type, family, dir);
> > > +		if (err) {
> > > +			if (err == -ESRCH)
> > > +				continue;
> > > +			else {
> > > +				ret = ERR_PTR(err);
> > > +				goto fail;
> > > +			}
> > > +		} else {
> > 
> > Semantics issue: if the exact policy match fails with 
> > -EACCESS, should we 
> > then try an inexact match before failing?
> 
> I wonder what you mean by an inexact match here.

There are two policy chains in the kernel: 'bydst'for non-prefixed 
addresses (e.g. /32 or /128 nodes) and 'byidx' for prefixed addresses.

xfrm_policy_lookup_bytype() first checks for a non-prefixed match and then 
for a prefixed match with a higher priority mark.

So, I wonder if it makes sense to continue on to the prefixed lookup if we 
get an -EACCESS on the non-prefixed lookup.

Perhaps some further discussion on this with MLS folk is needed, but in 
any case, I don't think it should block this patchset going in as a 
bugfix, as the behavior can be changed in a further patch if required.


- James
-- 
James Morris
<jmorris@namei.org>

  reply	other threads:[~2006-10-05 23:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 21:17 [PATCH 1/3] Fix for IPsec leakage with SELinux enabled - V.03 Venkat Yekkirala
2006-10-05 23:30 ` James Morris [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-05 21:27 Venkat Yekkirala
2006-10-05 21:47 ` David Miller
2006-10-05 23:05 ` James Morris
2006-10-05 20:42 Venkat Yekkirala
2006-10-05 20:54 ` James Morris
2006-10-05 21:04   ` David Miller

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=Pine.LNX.4.64.0610051918080.26924@d.namei \
    --to=jmorris@namei.org \
    --cc=davem@davemloft.net \
    --cc=eparis@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=johnpol@2ka.mipt.ru \
    --cc=netdev@vger.kernel.org \
    --cc=paul.moore@hp.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=vyekkirala@TrustedCS.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).