mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: utz lehmann <lkml123@s2y4n2c.de>
To: Miklos Szeredi <miklos@szeredi.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: unprivileged mount problems: device permissions ignored, mount sharing
Date: Sun, 29 Apr 2007 20:59:11 +0200	[thread overview]
Message-ID: <1177873151.4343.29.camel@segv.aura.of.mankind> (raw)

Hello

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.

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


And there is another problem with sharing the device (superblock?).
If user1 mount a device readonly:

[user1@segv ~]$ mmount -r -t xfs /dev/mapper/vg00-test /mnt/user1

Than root cannot mount the device rw:

[root@segv ~]# mount /dev/mapper/vg00-test /mnt/test/
mount: /dev/mapper/vg00-test already mounted or /mnt/test/ busy

Mounting ro works and than remounting rw work. But than /mnt/user1 is rw
too.

This can DoS e.g. the automounter mounting /dev/mapper/vg00-test rw.


utz



             reply	other threads:[~2007-04-29 18:59 UTC|newest]

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

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=1177873151.4343.29.camel@segv.aura.of.mankind \
    --to=lkml123@s2y4n2c.de \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®