From: Willy TARREAU <willy@w.ods.org>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: Willy TARREAU <willy@w.ods.org>,
marcelo@conectiva.com.br, viro@parcelfarce.linux.theplanet.co.uk,
linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH-2.4] Prevent mounting on ".."
Date: Sun, 29 Jun 2003 16:24:59 +0200 [thread overview]
Message-ID: <20030629142459.GB359@pcw.home.local> (raw)
In-Reply-To: <1056895780.1720.1.camel@laptop.fenrus.com>
On Sun, Jun 29, 2003 at 04:09:40PM +0200, Arjan van de Ven wrote:
> On Sun, 2003-06-29 at 15:09, Willy TARREAU wrote:
> > Hi Al and Marcelo,
> >
> > while I was trying to get maximum restrictions on a chroot on 2.4.21-pre,
> > I found that it's always possible to mount a ramfs or a tmpfs on "..",
> > and then upload whatever I wanted in it. It's a shame because I was
> > trying to isolate network daemons inside empty, read-only file-systems,
> > and I discovered that this effort was worthless. To resume, imagine a
> > network daemon which does :
>
> well...
> you need to be root to mount. If you're root you can break out of a
> chroot anyway....
not in all cases. for the classical "mkdir a; chroot a; chdir ..", you need a
writable directory to create "a" or an existing directory somewhere to serve
as a mount point. If neither of them is true, I don't see other means of
escaping the chroot. And here, ".." is the only one I could exploit, that's why
I proposed this patch which closes what is, to me, the only weakness in this
very particular case.
Cheers,
Willy
next prev parent reply other threads:[~2003-06-29 14:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-29 13:09 Willy TARREAU
2003-06-29 14:09 ` Arjan van de Ven
2003-06-29 14:24 ` Willy TARREAU [this message]
2003-06-29 14:11 ` viro
2003-06-29 14:20 ` Willy TARREAU
2003-06-29 14:27 ` viro
2003-06-29 14:35 ` Willy TARREAU
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=20030629142459.GB359@pcw.home.local \
--to=willy@w.ods.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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®