Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2011 19:24:28 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        Jamie Landeg Jones <jamie@bishopston.net>, Jason Hellenthal <jhell@DataIX.net>, feld@feld.me, Edho P Arief <edhoprima@gmail.com>, freebsd-security@freebsd.org, utisoft@gmail.com
Subject:   Re: Rooting FreeBSD , Privilege Escalation using Jails (P??????tur)
Message-ID:  <86k4dy31v7.fsf@ds4.des.no>
In-Reply-To: <20051.1305023864@critter.freebsd.dk> (Poul-Henning Kamp's message of "Tue, 10 May 2011 10:37:44 %2B0000")
References:  <20051.1305023864@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
"Poul-Henning Kamp" <phk@phk.freebsd.dk> writes:
> "Dag-Erling Sm=C3=B8rgrav" <des@des.no> writes:
> >Jason Hellenthal <jhell@DataIX.net> writes:
> > > Do you know if there is a way that chmod on / from within the jail co=
uld
> > > be prevented easily without breaking something ? Maybe not failing bu=
t=20
> > > falling though and return 0 for any operation with the sole argument =
of /.
> > Not without adding explicit checks in the kernel.
> I identified this issue back when I implemented jails and though long
> and hard about adding a kernel hack to paste over this.  [...]  I
> think we should stick to [Getty's rule] before adding more or less
> random pieces of magic to the kernel.

I vote no as well, but for a different reason: there are many other
things the jailed root can do to the root directory, including flags,
extended attributes, etc. (some of which are fs-dependent), and it would
be difficult or impossible to identify all of them, not to mention those
that aren't yet possible but will be in the future.  Fixing just one (or
two, or five) of them today might give users a false sense of security,
which is inexcusable when we can give a *true* sense of security by
telling them to "chmod 0700 $D/..".

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k4dy31v7.fsf>