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


Groups > linux.kernel > #1543155

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

From NeilBrown <neilb@suse.com>
Newsgroups linux.kernel
Subject Re: [RFC 0/4] make call_usermodehelper a bit more "safe"
Date 2016-12-16 02:10 +0100
Message-ID <sOPc6-4OF-11@gated-at.bofh.it> (permalink)
References <sOmMO-1X4-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Dec 15 2016, Greg KH wrote:

> Hi all,
>
> Here's a proof-of-concept patch series that tries to work to address the
> issue of call_usermodehelper being abused to have the kernel call any
> userspace binary with full root permissions.
>
> 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.

You seem to be targeting a situation where the kernel memory can be
easily changed, but filesystem content cannot (if it could - the
attacker would simply replace /sbin/hotplug).

If that is a credible threat scenario, it seems to me that the simplest
mitigation is to have call_usermodehelper always call a single
compiled-in path - e.g. /sbin/usermode-helper - and rely on that
program to validate argv[0] and call it if it is deemed safe.

i.e. get the policy out of the kernel.


Just a thought,
NeilBrown

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