lkml.org 
[lkml]   [2012]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] nextfd(2)
On Sun, Apr 1, 2012 at 21:19, Kyle Moffett <kyle@moffetthome.net> wrote:
> Well, I imagine one typical usecase for closing all FDs is for
> security isolation purposes (EG: chroot()+etc),

chroot and security in the same sentence...?


> and in a great deal of
> chroot environments you don't have /proc available.  In particular
> /proc has been a source of a lot of privilege escalations in the past,
> so avoiding mounting it in a chroot is good security policy if
> possible.

The problem is that the kernel exports quite a bit of information only
through the /proc and /sys filesystems. I might try to finish my
comprehensive list of functionality depending on /proc sometime soon.
The list is quite long.

Not mounting /proc is inconvenient at best, it renders the environment
unusable quite often and in some cases is outright insecure.. I don't
think you can use not mounting /proc as an argument. And, as Peter
said, the loop over the directory content is quite efficient.

If you want to avoid /proc I suggest you first work on removing the
dependencies. Of just secure /proc itself.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-04-02 13:41    [from the cache]
©2003-2011 Jasper Spaans