Util-Linux package development
 help / color / mirror / Atom feed
From: "U.Mutlu" <for-gmane@mutluit.com>
To: util-linux@vger.kernel.org
Subject: Re: mount-user.c
Date: Fri, 4 Dec 2015 08:32:08 +0100	[thread overview]
Message-ID: <n3rfho$noi$1@ger.gmane.org> (raw)
In-Reply-To: <5660A0AC.40501@intellitree.com>

Michael Conrad wrote on 12/03/2015 09:06 PM:
> Your script is vulnerable to PATH changes.  Also be aware of LD_LIBRARY_PATH
> attacks.  If you write a custom c program it should probably call the mount
> syscall directly.
>
> But, you seem to forget the *most* dangerous mount abilities, which are device
> nodes and set-uid binaries.  Consider forcing nodev, noexec, and nosuid.
>
> Also the "--move" and "--remount" options aren't safe.
>
> And these are just the problems I know about...
>
> -Mike

Thanks Mike for these useful info.

As Karel here posted, mount has also 'non-superuser mounts' (cf. man mount).
I think this one is safer than my wrapper method, I hope at least :-)

-- 
U.Mutlu



  reply	other threads:[~2015-12-04  7:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 17:17 RFC: usermount - a secure mount for unpriviledged users U.Mutlu
2015-11-18 18:24 ` Mantas Mikulėnas
2015-11-19  0:53   ` mount-user.c U.Mutlu
2015-12-03 20:06     ` mount-user.c Michael Conrad
2015-12-04  7:32       ` U.Mutlu [this message]
2015-11-19  1:08   ` RFC: usermount - a secure mount for unpriviledged users Casper Ti. Vector
2015-11-19  1:53     ` udevil - mount tool U.Mutlu
2015-11-19  2:21       ` Casper Ti. Vector
2015-11-19 11:05 ` RFC: usermount - a secure mount for unpriviledged users Karel Zak
2015-11-19 18:07   ` U.Mutlu
2015-11-19 18:18     ` U.Mutlu

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='n3rfho$noi$1@ger.gmane.org' \
    --to=for-gmane@mutluit.com \
    --cc=util-linux@vger.kernel.org \
    /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