public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: lkml123@s2y4n2c.de, linux-kernel@vger.kernel.org
Subject: Re: unprivileged mount problems: device permissions ignored, mount sharing
Date: Sun, 6 May 2007 12:21:51 +0200	[thread overview]
Message-ID: <20070506102150.GA20740@janus> (raw)
In-Reply-To: <E1Hj9hk-00019p-00@dorka.pomaz.szeredi.hu>

On Wed, May 02, 2007 at 09:56:52AM +0200, Miklos Szeredi wrote:
> > I tried the unprivileged mount v5 patches with 2.6.21.1. I made some
> > experiments with normal filesystems (ext3, xfs, iso9660). I removed the
> > FS_SAFE checks for that.
> 
> Thanks for looking at this.
> 
> > Mounting and umounting as unprivileged user (user1) works, e.g.
> > (/mnt/user1 is a mount owned by user1)
> > 
> > [user1@segv ~]$ mmount -t xfs /dev/mapper/vg00-test /mnt/user1
> > 
> > But the device permissions are ignored. The unprivileged user can mount
> > the block device even there are no permissions to access it:
> > 
> > brw------- 1 root root 253, 5 Apr 29 18:32 /dev/mapper/vg00-test
> 
> Yes, I'm aware of this.  Before we enable FS_SAFE for block
> filesystems, this must be addressed.
> 
> But I'm not sure _if_ we'll ever want this.  It is very likely that
> there are some other security holes in most filesystems that are
> difficult to address.  One example is checking for hard-linked
> directories, which is normally only done during an fsck.

Some filesystems are not hardened against mounting a corrupted image and
can Oops. This is also a problem for automounting USB sticks except that
in that case you're (probably) sitting next to the hardware so there
are other ways to do bad things.

>From a security point of view I'd like to restrict unprivileged mounts
to a configurable list of filesystem types.

-- 
Frank

      reply	other threads:[~2007-05-06 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29 18:59 unprivileged mount problems: device permissions ignored, mount sharing utz lehmann
2007-05-02  7:56 ` Miklos Szeredi
2007-05-06 10:21   ` Frank van Maarseveen [this message]

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=20070506102150.GA20740@janus \
    --to=frankvm@frankvm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml123@s2y4n2c.de \
    --cc=miklos@szeredi.hu \
    /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