Re: ipf und Jails

From: Oliver Fromme <olli(at)lurza.secnetix.de>
Date: Thu, 12 Feb 2004 10:33:15 +0100 (CET)

Sebastian Böck <sebastianboeck(at)freenet.de> wrote:
> ich hab hier einen Computer (CURRENT), auf dem mehrere Jails
> eingerichtet sind. Als Paketfilter/NAT hab ich ipf/ipnat laufen.
>
> Vorhin mußte ich mit Erschrecken feststellen, dass man als Root
> von einem Jail einfach so neue ipf-Regeln laden kann!
>
> Bitte klärt mich auf, daß sowas eigentlich nicht gehen darf.
> Sicher hab ich bloß irgendwas übersehen, wobei meiner Meinung
> nach dies standardmäßig auf far keinen Fall gehen dürfte.

Es geht standardmäßig auch gar nicht, weil's per Default
die Devices nicht gibt (/dev/ip*).

Unter 4-stable werden die /dev/ip* Devices gar nicht erst
angelegt (»sh MAKEDEV jail«). Unter 5-current mit devfs
funktioniert das etwas anders, aber auch dort sollte man
kein vollständiges devfs reinmounten. Ganz schlechte Idee.
Die Manpage sagt dazu:

»NOTE: It is important that only appropriate device nodes
in devfs be exposed to a jail; access to disk devices in
the jail may permit processes in the jail to bypass the
jail sandboxing by modifying files outside of the jail.
See devfs(8) for information on how to use devfs rules to
limit access to entries in the per-jail devfs.«

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
It's trivial to make fun of Microsoft products,
but it takes a real man to make them work,
and a God to make them do anything useful.
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Thu 12 Feb 2004 - 10:39:39 CET

search this site