[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091227150300.GB19414@hallyn.com>
Date: Sun, 27 Dec 2009 09:03:00 -0600
From: "Serge E. Hallyn" <serge@...lyn.com>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: pavel@....cz, viro@...IV.linux.org.uk, michael@...top.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-security-module@...r.kernel.org, andi@...stfloor.org,
david@...g.hm, socketcan@...tkopp.net, alan@...rguk.ukuu.org.uk,
herbert@...dor.apana.org.au, Valdis.Kletnieks@...edu,
bdonlan@...il.com, zbr@...emap.net, cscott@...ott.net,
jmorris@...ei.org, ebiederm@...ssion.com, bernie@...ewiz.org,
mrs@...hic-beasts.com, randy.dunlap@...cle.com,
xiyou.wangcong@...il.com, sam@...ack.fr, casey@...aufler-ca.com,
serue@...ibm.com
Subject: Re: RFC: disablenetwork facility. (v4)
Quoting Tetsuo Handa (penguin-kernel@...ove.SAKURA.ne.jp):
> Pavel Machek wrote:
> > Syscalls are very wrong granularity for security system. But easy to
> > implement, see seccomp.
>
> Quoting from http://en.wikipedia.org/wiki/Seccomp
> > It allows a process to make a one-way transition into a "secure" state where
> > it cannot make any system calls except exit(), read() and write() to
> > already-open file descriptors.
>
> I think seccomp() is too much restricted to apply for general applications.
> Most applications will need some other syscalls in addition to exit(), read()
> and write(). Most applications cannot use seccomp().
>
> What I want to do is similar to seccomp(), but allows userland process to
> forbid some syscalls like execve(), mount(), chroot(), link(), unlink(),
> socket(), bind(), listen() etc. selectively.
The nice thing about the disablenetwork module is that (AFAICS so far)
it actually is safe for an unprivileged user to do. I can't think of
any setuid-root software which, if started with restricted-network by
an unprivileged user, would become unsafe rather than simply failing (*1).
Adding syscalls becomes much scarier.
-serge
*1 - Michael Stone, without looking back over the patches, do you also
restrict opening netlink sockets? Should we worry about preventing
an error message from being sent to the audit daemon?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists