From: Mark Rutland <mark.rutland@arm.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: kernel-hardening@lists.openwall.com,
linux-kernel@vger.kernel.org,
Gengjia Chen <chengjia4574@gmail.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe"
Date: Wed, 14 Dec 2016 19:25:00 +0000 [thread overview]
Message-ID: <20161214192459.GA16972@leverpostej> (raw)
In-Reply-To: <20161214185000.GA3930@kroah.com>
Hi,
On Wed, Dec 14, 2016 at 10:50:00AM -0800, Greg KH wrote:
> The issue is that if you end up getting write access to kernel memory,
> if you change the string '/sbin/hotplug' to point to
> '/home/hacked/my_binary', then the next uevent that the system makes
> will call this binary instead of the "trusted" one.
>
> It does this by moving the location of the binary to be in read-only
> memory. This works for a number of call_usermodehelper strings, as they
> are specified at build or configuration time. But, some subsystems have
> the option to let userspace change the value at runtime, so those values
> can't live in read-only memory.
> So, anyone have any better ideas? Is this approach worth it? Or should
> we just go down the "whitelist" path?
As a general note, I believe the write-rarely / mostly-ro [1] stuff is
meant to cater for this case, but I haven't heard anything on that front
recently (and there doesn't appear to be anything on the KSPP TODO
page).
If that does cater for this case, and if we're able to implement that
generically, that might be nicer than locking down the set of binaries
at build time.
Chen, are you still looking at implementing write-rarely support?
Thanks,
Mark.
[1] http://www.openwall.com/lists/kernel-hardening/2016/11/16/3
next prev parent reply other threads:[~2016-12-14 19:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 18:50 [RFC 0/4] make call_usermodehelper a bit more "safe" Greg KH
2016-12-14 18:50 ` [PATCH 1/4] kmod: make usermodehelper path a const string Greg KH
2016-12-14 18:50 ` [PATCH 2/4] drbd: rename "usermode_helper" to "drbd_usermode_helper" Greg KH
2016-12-14 18:50 ` [PATCH 3/4] Make static usermode helper binaries constant Greg KH
2016-12-14 19:11 ` [kernel-hardening] " Greg KH
2016-12-14 20:29 ` Rich Felker
2016-12-14 20:54 ` Greg KH
2016-12-15 17:54 ` Greg KH
2016-12-15 20:51 ` Daniel Micay
2016-12-15 21:18 ` Greg KH
2016-12-16 0:05 ` Daniel Micay
2016-12-16 0:14 ` Daniel Micay
2016-12-14 18:51 ` [RFC 4/4] Introduce CONFIG_READONLY_USERMODEHELPER Greg KH
2016-12-14 20:31 ` Kees Cook
2016-12-14 20:57 ` Greg KH
2016-12-14 19:25 ` Mark Rutland [this message]
2016-12-14 20:16 ` [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe" Kees Cook
2016-12-14 21:28 ` Jason A. Donenfeld
2016-12-14 23:16 ` Greg Kroah-Hartman
2016-12-16 1:02 ` NeilBrown
2016-12-16 12:49 ` Greg KH
2016-12-19 13:34 ` Jiri Kosina
2016-12-20 9:27 ` Greg KH
2016-12-20 10:27 ` Jiri Kosina
2016-12-20 10:31 ` Jiri Kosina
2016-12-20 10:48 ` Greg KH
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=20161214192459.GA16972@leverpostej \
--to=mark.rutland@arm.com \
--cc=chengjia4574@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
/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