From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Matthew Garrett <matthewgarrett@google.com>
Cc: jmorris@namei.org, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, dhowells@redhat.com,
Andy Shevchenko <andy.shevchenko@gmail.com>,
acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
Matthew Garrett <mjg59@srcf.ucam.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 25/27] debugfs: Restrict debugfs when the kernel is locked down
Date: Tue, 26 Mar 2019 09:31:37 +0900 [thread overview]
Message-ID: <20190326003137.GB5112@kroah.com> (raw)
In-Reply-To: <20190325220954.29054-26-matthewgarrett@google.com>
On Mon, Mar 25, 2019 at 03:09:52PM -0700, Matthew Garrett wrote:
> From: David Howells <dhowells@redhat.com>
>
> Disallow opening of debugfs files that might be used to muck around when
> the kernel is locked down as various drivers give raw access to hardware
> through debugfs. Given the effort of auditing all 2000 or so files and
> manually fixing each one as necessary, I've chosen to apply a heuristic
> instead. The following changes are made:
>
> (1) chmod and chown are disallowed on debugfs objects (though the root dir
> can be modified by mount and remount, but I'm not worried about that).
>
> (2) When the kernel is locked down, only files with the following criteria
> are permitted to be opened:
>
> - The file must have mode 00444
> - The file must not have ioctl methods
> - The file must not have mmap
>
> (3) When the kernel is locked down, files may only be opened for reading.
>
> Normal device interaction should be done through configfs, sysfs or a
> miscdev, not debugfs.
Then why not just not allow debugfs at all if it is such a "big
problem"?
Actually, it is a big problem, and I am pushing for systems to not mount
debugfs at all these days, but that's a different story...
Just "disabling" it entirely for this crazy dream of a "locked down"
kernel is fine for me.
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-26 0:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190325220954.29054-1-matthewgarrett@google.com>
2019-03-25 22:09 ` [PATCH 25/27] debugfs: Restrict debugfs when the kernel is locked down Matthew Garrett
2019-03-26 0:31 ` Greg Kroah-Hartman [this message]
2019-03-26 0:38 ` Matthew Garrett
2019-03-26 0:43 ` Greg Kroah-Hartman
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=20190326003137.GB5112@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy.shevchenko@gmail.com \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=matthewgarrett@google.com \
--cc=mjg59@srcf.ucam.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
/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