From: Eric Paris <eparis@redhat.com>
To: Xavier Toth <txtoth@gmail.com>
Cc: Eric Paris <eparis@parisplace.org>,
Stephen Smalley <sds@tycho.nsa.gov>,
"David P. Quigley" <dpquigl@tycho.nsa.gov>,
SELinux <selinux@tycho.nsa.gov>
Subject: Re: fuse and selinux don't seem to work well together
Date: Mon, 26 Jul 2010 17:35:48 -0400 [thread overview]
Message-ID: <1280180148.23427.97.camel@localhost> (raw)
In-Reply-To: <AANLkTik=NrTj2exhqJt012hYrRUmTy7kjZ6cRH+-OHR4@mail.gmail.com>
On Mon, 2010-07-26 at 16:15 -0500, Xavier Toth wrote:
> > Fuse can deal with xattrs but only AFTER the fuse userspace program
> > believes the filesystem is mounted (and if the filesystem can handle
> > it). My original patches didn't work, because I was calling getxattr
> > during the mount(2) syscall. It gets even worse. We had a 'bug' in
> > which the mount(8) program would call stat (or something like that) on
> > the root inode before it told the fuse userspace program the mount was
> > finished. The audit system checked for file capabilities on the stat
> > call, which resulted in an xattr upcall, which resulted in a deadlock
> > because the fuse userspace wouldn't answer until the mount finished.
> > The 'fix' was to stop mount(8) from calling stat on fuse mounts.
>
> So is this past tense, there was a bug in mount(8) that has been addressed?
That's correct. mount(8) now has a --no-canonicalize option which fuse
uses to make it not call stat before it completes to avoid the deadlock.
> > The 'right' solution (I think) is going to be 2 parts. First we need
> > to get more information in the superblock mounting. I seem to recall
> > that the only information we had was that it was 'fuse.' Not that is
> > was fuse mounting ntfs.
>
> It appear that the superblock contains s_type->name and s_subtype
> which should tell you that it is for example an fuse.ntfs mount.
>
> > After that we need to fix the other bug you
> > pointed out (and other bug I half worked on and you might be able to
> > find the patch in the archives somewhere)
>
> Sorry I'm not sure which bug you are referring to?
> http://marc.info/?l=selinux&m=121379719014155&w=2 appears to be your
> patch which I will look into applying.
I was thinkin of these:
http://www.nsa.gov/research/selinux/list-archive/0805/26041.shtml
genfscon is not allowed in modules. I stop looking when I realized that
those don't really handle the mls portion of the label correctly...
So sds wants to autodetect xattr support. that sounds great, but I
think is a large project that will require redesigning fuse.
I am suggesting a smaller interim solution that consists of 2 steps.
1) get all the information about the name you need into the kernel in
the right place. aka s_type->name and s_subtype in the right hook. I
think David indicated that is going to take some kernel reworking to get
s_subtype set at the appropriate time.
2) add support to the policy to support filesystem labeling rules in
modules. I believe this is going to require the changes I was talking
about in the above link.
--
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:[~2010-07-26 21:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 17:14 fuse and selinux don't seem to work well together Xavier Toth
2010-07-23 17:35 ` David P. Quigley
2010-07-23 17:46 ` David P. Quigley
2010-07-23 18:32 ` David P. Quigley
2010-07-23 18:57 ` Xavier Toth
2010-07-23 19:34 ` Stephen Smalley
2010-07-25 15:14 ` Xavier Toth
2010-07-25 22:24 ` Eric Paris
2010-07-26 3:37 ` merlin
2010-07-26 13:44 ` Xavier Toth
2010-07-26 18:13 ` Xavier Toth
2010-07-26 18:30 ` Eric Paris
2010-07-26 19:22 ` David P. Quigley
2010-07-26 20:22 ` Xavier Toth
2010-07-26 20:31 ` David P. Quigley
2010-07-26 21:23 ` Eric Paris
2010-07-26 21:40 ` David P. Quigley
2010-07-27 1:12 ` Eric Paris
2010-07-27 12:43 ` Stephen Smalley
2010-07-26 21:15 ` Xavier Toth
2010-07-26 21:10 ` David P. Quigley
2010-07-26 21:35 ` Eric Paris [this message]
2010-07-26 22:29 ` David P. Quigley
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=1280180148.23427.97.camel@localhost \
--to=eparis@redhat.com \
--cc=dpquigl@tycho.nsa.gov \
--cc=eparis@parisplace.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=txtoth@gmail.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 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.