linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tytso@mit.edu (Theodore Y. Ts'o)
To: linux-security-module@vger.kernel.org
Subject: leaking path in android binder: set_nice
Date: Tue, 25 Sep 2018 22:58:08 -0400	[thread overview]
Message-ID: <20180926025808.GA3321@thunk.org> (raw)
In-Reply-To: <d38229cb-eb38-19fa-f5d6-30e6389ade3b@tycho.nsa.gov>

On Tue, Sep 25, 2018 at 01:52:57PM -0400, Stephen Smalley wrote:
> On 09/25/2018 01:27 PM, Tong Zhang wrote:
> > Kernel Version: 4.18.5
> > 
> > Problem Description:
> > 
> > When setting nice value, it is checked by LSM function security_task_setnice().
> > see kernel/sched/core.c:3972 SYSCALL_DEFINE1(nice, int, increment)
> > 
> > We discovered a leaking path in android binder which allows using binder?s interface to change
> > a process?s nice value. This path is leaked from being monitored by LSM.
> > see drivers/android/binder.c:1107 binder_set_nice.
> 
> Not sure you want to invoke the LSM hook (or at least the same hook) when
> binder is performing priority inheritance.  There is a difference between a
> userspace process switching its own priority and the kernel binder driver
> performing it.  IIUC, the can_nice() check is more about honoring
> RLIMIT_NICE than anything else.

I agree with Stephen; it doesn't make sense to subject the binder PI
mechanism to the LSM hook.

					- Ted

      reply	other threads:[~2018-09-26  2:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 17:27 leaking path in android binder: set_nice Tong Zhang
2018-09-25 17:38 ` Greg KH
2018-09-25 17:52 ` Stephen Smalley
2018-09-26  2:58   ` Theodore Y. Ts'o [this message]

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=20180926025808.GA3321@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-security-module@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;
as well as URLs for NNTP newsgroup(s).