mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: NeilBrown <neilb@suse.com>,
	kernel-hardening@lists.openwall.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC 0/4] make call_usermodehelper a bit more "safe"
Date: Tue, 20 Dec 2016 11:27:13 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.20.1612201117220.19203@cbobk.fhfr.pm> (raw)
In-Reply-To: <20161220092734.GA12200@kroah.com>

On Tue, 20 Dec 2016, Greg KH wrote:

> > Sorry, I really don't get this.
> > 
> > If kernel memory can be easily changed (which is assumed here), why bother 
> > with all this? I'll just set current->uid to 0 and be done.
> 
> Because you don't want your current process to uid 0, you want some
> other program to run as root.  It's quite common for exploits to work
> this way, take a look at how the p0wn-to-own "contests" usually break
> out of sandboxed systems like browsers.

So what kind of sandbox are we talking about here?

namespaces-based sanbox? If you have direct access to kernel memory, you 
can just assign whatever context you want to task_struct's fs struct, and 
you are out of a sandbox.

chroot-based sandbox? Exactly the same argument (you just reset fs->root 
in task_struct).

I stay totally unconvinced that such kind of countermeasure brings any 
value whatsoever. Could you please bring up a particular usecase, where 
you have complete control over kernel memory, and still the only possible 
exploit factor is redirecting usermodhelper? It feels like rather random 
shot into darkness.

Thanks,

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2016-12-20 10:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 18:50 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 ` [kernel-hardening] [RFC 0/4] make call_usermodehelper a bit more "safe" Mark Rutland
2016-12-14 20:16   ` 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 [this message]
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=alpine.LSU.2.20.1612201117220.19203@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.com \
    /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

all inboxes | Powered by JetHome®