All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Xavier Toth <txtoth@gmail.com>
Cc: merlin <merlin@countercultured.net>,
	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 14:30:35 -0400	[thread overview]
Message-ID: <1280169035.23427.43.camel@localhost> (raw)
In-Reply-To: <AANLkTin-e33oxHUVJ2wX92YmQou-pN5MR8kKTG7LMZEM@mail.gmail.com>

On Mon, 2010-07-26 at 13:13 -0500, Xavier Toth wrote:
> On Mon, Jul 26, 2010 at 8:44 AM, Xavier Toth <txtoth@gmail.com> wrote:
> > On Sun, Jul 25, 2010 at 10:37 PM, merlin <merlin@countercultured.net> 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.
> >>>
> >>> 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.'
> 
> After looking at this for awhile it seems to me that fuse_get_sb needs
> to call security_sb_set_mnt_opts get its superblock security structure
> initialized especially for the case when I used the fs_use_xattrs in
> policy.

For most FS (everything but NFS referrals and submounts as I recall)
this is supposed to get called via the

vfs_kern_mount -> security_sb_kern_mount -> selinux_sb_kern_mount ->
superblock_doinit -> selinux_set_mnt_opts

call chain.  If fuse isn't calling security_sb_kern_mount I'd have to
think something is wrong...

-Eric


--
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:[~2010-07-26 18:30 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 [this message]
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
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=1280169035.23427.43.camel@localhost \
    --to=eparis@redhat.com \
    --cc=dpquigl@tycho.nsa.gov \
    --cc=eparis@parisplace.org \
    --cc=merlin@countercultured.net \
    --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.