From: Paul Moore <paul.moore@hp.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: The problem with TUN/TAP devices
Date: Wed, 1 Jul 2009 11:11:47 -0400 [thread overview]
Message-ID: <200907011111.48002.paul.moore@hp.com> (raw)
In-Reply-To: <4A4AD8CE.3000604@schaufler-ca.com>
On Tuesday 30 June 2009 11:32:30 pm Casey Schaufler wrote:
> Paul Moore wrote:
> > Unfortunately we have a problem with the network access controls and
> > TUN/TAP devices. The basic issue is that packets entering the stack via
> > a TUN device, e.g. QEMU/KVM guest instance operating with a bridged
> > network configuration, do not have a fully initialized sock associated
> > with them. I say "fully initialized" because the basic initialization
> > has been done (memory allocated, initial values set to
> > SECINITSID_UNLABELED, etc.) but the last step where we assign the sock a
> > label/SID never happens. Why? Because the TUN driver code only calls
> > sk_alloc() and nothing else in the TUN code paths finish the SELinux sock
> > setup.
>
> So what should it be calling and why is the fact that it isn't not a bug
> in the TUN driver?
...
> As this would appear to be a flaw in the TUN driver, get the TUN
> developers to fix their broken driver. I certainly dislike a special
> purpose LSM hook for this.
I do too.
> Do you see this as a problem for all users of labeled networking,
> or is it isolated to SELinux?
The issue first came up with respect to SELinux so that is where I've been
looking/thinking. While there is a potential for Smack to be affected I doubt
that will be he case since Smack doesn't really care about stuff at the
postrouting level; although Smack may want to enforce some level of access
control but I need to go re-remember how Smack does outbound access control.
TOMOYO should be unaffected since they don't mess with labels.
--
paul moore
linux @ hp
--
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:[~2009-07-01 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 21:34 The problem with TUN/TAP devices Paul Moore
2009-06-30 22:19 ` James Morris
2009-07-01 15:06 ` Paul Moore
2009-07-01 3:32 ` Casey Schaufler
2009-07-01 15:11 ` Paul Moore [this message]
2009-07-01 13:44 ` Stephen Smalley
2009-07-01 15:01 ` Eric Paris
2009-07-01 15:06 ` Stephen Smalley
2009-07-01 15:19 ` Paul Moore
2009-07-01 15:42 ` Stephen Smalley
2009-07-01 16:34 ` Paul Moore
2009-07-01 22:42 ` James Morris
2009-07-01 22:58 ` Paul Moore
2009-07-01 23:53 ` James Morris
2009-07-02 16:58 ` 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=200907011111.48002.paul.moore@hp.com \
--to=paul.moore@hp.com \
--cc=casey@schaufler-ca.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.