Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542138

Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe"

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe"
Date 2016-12-14 20:30 +0100
Message-ID <sOnpv-2DO-3@gated-at.bofh.it> (permalink)
References <sOmMO-1X4-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 19:50 +0100
  [PATCH 1/4] kmod: make usermodehelper path a const string Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 20:00 +0100
  [PATCH 3/4] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 20:00 +0100
    Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 20:20 +0100
    Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Rich Felker <dalias@libc.org> - 2016-12-14 21:40 +0100
      Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Greg KH <greg@kroah.com> - 2016-12-14 22:00 +0100
        Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Greg KH <greg@kroah.com> - 2016-12-15 19:00 +0100
          Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Daniel Micay <danielmicay@gmail.com> - 2016-12-15 22:00 +0100
            Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Greg KH <gregkh@linuxfoundation.org> - 2016-12-15 22:20 +0100
              Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Daniel Micay <danielmicay@gmail.com> - 2016-12-16 01:10 +0100
                Re: [kernel-hardening] [PATCH 3/4] Make static usermode helper  binaries constant Daniel Micay <danielmicay@gmail.com> - 2016-12-16 01:30 +0100
  [RFC 4/4] Introduce CONFIG_READONLY_USERMODEHELPER Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 20:00 +0100
    Re: [RFC 4/4] Introduce CONFIG_READONLY_USERMODEHELPER Kees Cook <keescook@chromium.org> - 2016-12-14 21:40 +0100
      Re: [RFC 4/4] Introduce CONFIG_READONLY_USERMODEHELPER Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 22:10 +0100
  [PATCH 2/4] drbd: rename "usermode_helper" to "drbd_usermode_helper" Greg KH <gregkh@linuxfoundation.org> - 2016-12-14 20:00 +0100
  Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more  "safe" Mark Rutland <mark.rutland@arm.com> - 2016-12-14 20:30 +0100
    Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe" Kees Cook <keescook@chromium.org> - 2016-12-14 21:20 +0100
  Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe" "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-14 22:30 +0100
    Re: [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more  "safe" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-12-15 00:20 +0100
  Re: [RFC 0/4] make call_usermodehelper a bit more "safe" NeilBrown <neilb@suse.com> - 2016-12-16 02:10 +0100
    Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2016-12-16 14:00 +0100
      Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Jiri Kosina <jikos@kernel.org> - 2016-12-19 14:40 +0100
        Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2016-12-20 10:30 +0100
          Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Jiri Kosina <jikos@kernel.org> - 2016-12-20 11:30 +0100
            Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Jiri Kosina <jikos@kernel.org> - 2016-12-20 11:40 +0100
              Re: [RFC 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2016-12-20 11:50 +0100

csiph-web