[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLX_3Wawdr7vtet4p0gxcCLRkmirnU1dS82Y3XH+sSbHDQ@mail.gmail.com>
Date: Tue, 30 Aug 2016 16:36:02 -0700
From: John Stultz <john.stultz@...aro.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Kees Cook <keescook@...omium.org>,
lkml <linux-kernel@...r.kernel.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Thomas Gleixner <tglx@...utronix.de>,
Arjan van de Ven <arjan@...ux.intel.com>,
Oren Laadan <orenl@...lrox.com>,
Ruchi Kandoi <kandoiruchi@...gle.com>,
Rom Lemarchand <romlem@...roid.com>,
Todd Kjos <tkjos@...gle.com>, Colin Cross <ccross@...roid.com>,
Nick Kralevich <nnk@...gle.com>,
Dmitry Shmidt <dimitrysh@...gle.com>,
Elliott Hughes <enh@...gle.com>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [RESEND][PATCH] proc: Fix timerslack_ns CAP_SYS_NICE check when
adjusting self
On Tue, Aug 30, 2016 at 4:06 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Tue, 30 Aug 2016 18:46:23 -0400 Kees Cook <keescook@...omium.org> wrote:
>
>> On Mon, Aug 22, 2016 at 7:01 PM, John Stultz <john.stultz@...aro.org> wrote:
>> > In changing from checking ptrace_may_access(p, PTRACE_MODE_ATTACH_FSCREDS)
>> > to capable(CAP_SYS_NICE), I missed that ptrace_my_access succeeds
>> > when p == current, but the CAP_SYS_NICE doesn't.
>> >
>> > Thus while the previous commit was intended to loosen the needed
>> > privledges to modify a processes timerslack, it needlessly restricted
>> > a task modifying its own timerslack via the proc/<tid>/timerslack_ns
>> > (which is permitted also via the PR_SET_TIMERSLACK method).
>> >
>> > This patch corrects this by checking if p == current before checking
>> > the CAP_SYS_NICE value.
>> >
>> > This patch applies on top of my two previous patches currently in -mm
>> >
>> > Cc: Kees Cook <keescook@...omium.org>
>> > Cc: "Serge E. Hallyn" <serge@...lyn.com>
>> > Cc: Andrew Morton <akpm@...ux-foundation.org>
>> > Cc: Thomas Gleixner <tglx@...utronix.de>
>> > CC: Arjan van de Ven <arjan@...ux.intel.com>
>> > Cc: Oren Laadan <orenl@...lrox.com>
>> > Cc: Ruchi Kandoi <kandoiruchi@...gle.com>
>> > Cc: Rom Lemarchand <romlem@...roid.com>
>> > Cc: Todd Kjos <tkjos@...gle.com>
>> > Cc: Colin Cross <ccross@...roid.com>
>> > Cc: Nick Kralevich <nnk@...gle.com>
>> > Cc: Dmitry Shmidt <dimitrysh@...gle.com>
>> > Cc: Elliott Hughes <enh@...gle.com>
>> > Cc: Android Kernel Team <kernel-team@...roid.com>
>> > Acked-by: Kees Cook <keescook@...omium.org>
>> > Signed-off-by: John Stultz <john.stultz@...aro.org>
>>
>> Andrew, can you take this for v4.8?
>
> Well, it fixes
> proc-relax-proc-tid-timerslack_ns-capability-requirements.patch,
> somewhat. And it textually depends on that.
>
> Do we want all of
>
> proc-relax-proc-tid-timerslack_ns-capability-requirements.patch
> proc-add-lsm-hook-checks-to-proc-tid-timerslack_ns.patch
> proc-fix-timerslack_ns-cap_sys_nice-check-when-adjusting-self.patch
>
> in 4.8? If so, why?
No.. they're fine to wait for the 4.9 merge window. But you picking up
this last fix is appreciated!
thanks
-john
Powered by blists - more mailing lists