From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Theodore Ts'o" <tytso@mit.edu>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, Ben Hutchings <ben@decadent.org.uk>,
Rob Landley <rob@landley.net>, Al Viro <viro@zeniv.linux.org.uk>,
Ludwig Nussel <ludwig.nussel@suse.de>,
Alessandro Rubini <rubini@gnudd.com>,
linux-doc@vger.kernel.org
Subject: Re: Hardening debugfs (Was Re: [PATCH] debugfs: more tightly restrict default mount mode)
Date: Tue, 28 Aug 2012 10:09:08 -0700 [thread overview]
Message-ID: <20120828170908.GA14655@kroah.com> (raw)
In-Reply-To: <20120828144110.GA23035@thunk.org>
On Tue, Aug 28, 2012 at 10:41:10AM -0400, Theodore Ts'o wrote:
> On Mon, Aug 27, 2012 at 01:32:15PM -0700, Kees Cook wrote:
> > Since the debugfs is mostly only used by root, make the default mount
> > mode 0700. Most system owners do not need a more permissive value,
> > but they can choose to weaken the restrictions via their fstab.
> >
> > Signed-off-by: Kees Cook <keescook@chromium.org>
>
> I agree with this patch, but it would also be good if we could try to
> harden debugfs in general. Some ideas that might be worth discussing,
> for example?
>
> 1) Adding a per-module flag, so things in debugfs only show up if they
> are explicitly requested (you know, for debugging purposes). If most
> people are using debugfs for access to ftrace and powertap (my use
> case), there's no point making directories for other device drivers
> and file systems visible.
The module code is "explicitly requesting" a debugfs file when it makes
the call to create it. If you want to depend on a flag for the
individual modules to do this or not, sure, go ahead, but that's a
module/driver issue, nothing I can do in the debugfs core itself.
> 2) Can we find a pattern of common security #fail's with debugfs
> files, and try to sweep through and fix them?
The only one I know of is the "unload the module with an open file
handle" issue. I'm pretty sure this could be fixed up somehow in
debugfs, much like it was resolved in sysfs, but it would take a lot of
work, for a very limited benefit (in other words, if someone sends me
patches for this, great, but it's so low on my TODO list that I'll
probably never get to it myself.)
thanks,
greg k-h
next prev parent reply other threads:[~2012-08-28 17:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 20:32 [PATCH] debugfs: more tightly restrict default mount mode Kees Cook
2012-08-27 20:41 ` Greg Kroah-Hartman
2012-08-28 7:44 ` Alessandro Rubini
2012-08-28 14:41 ` Hardening debugfs (Was Re: [PATCH] debugfs: more tightly restrict default mount mode) Theodore Ts'o
2012-08-28 14:55 ` Ben Hutchings
2012-08-28 15:02 ` Theodore Ts'o
2012-08-28 17:09 ` Greg Kroah-Hartman [this message]
2012-08-28 19:43 ` Kees Cook
2012-08-28 22:55 ` Rob Landley
2012-08-29 4:09 ` Greg Kroah-Hartman
2012-08-30 16:15 ` Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120828170908.GA14655@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ben@decadent.org.uk \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludwig.nussel@suse.de \
--cc=rob@landley.net \
--cc=rubini@gnudd.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox