[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9JgYPHebozyuTTe@example.org>
Date: Thu, 26 Jan 2023 12:13:36 +0100
From: Alexey Gladkov <legion@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, containers@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
Alexey Dobriyan <adobriyan@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Val Cowan <vcowan@...hat.com>
Subject: Re: [RFC PATCH v1 2/6] proc: Add allowlist to control access to
procfs files
On Wed, Jan 25, 2023 at 03:36:42PM -0800, Andrew Morton wrote:
> On Wed, 25 Jan 2023 16:28:49 +0100 Alexey Gladkov <legion@...nel.org> wrote:
>
> > If, after creating a container and mounting procfs, the system
> > configuration may change and new files may appear in procfs. Files
> > including writable root or any other users.
> >
> > In most cases, it is known in advance which files in procfs the user
> > needs in the container. It is much easier to control the list of what
> > you want than to control the list of unwanted files.
> >
> > To do this, subset=allowlist is added to control the visibility of
> > static files in procfs (not process pids). After that, the control file
> > /proc/allowlist appears in the root of the filesystem. This file
> > contains a list of files and directories that will be visible in this
> > vmountpoint. Immediately after mount, this file contains only one
> > name - the name of the file itself.
> >
> > The admin can add names, read this file to get the current state of the
> > allowlist. The file behaves almost like a regular file. Changes are
> > applied when the file is closed.
>
> "the admin" is a bit vague. Precisely which capabilities are required
> for this?
In this commit, the admin is the one with CAP_SYS_ADMIN. You're right,
I'll fix the commit message.
> > To prevent changes to allowlist, admin should remove its name from the
> > list of allowed files. After this change, the file will disappear.
>
--
Rgrds, legion
Powered by blists - more mailing lists