lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALAqxLVQHvm5yQj=AY8akAcqSf0bXdmAFdYWC+gSCSDom4COBA@mail.gmail.com>
Date:	Fri, 15 Jul 2016 11:10:32 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Nick Kralevich <nnk@...gle.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Kees Cook <keescook@...omium.org>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	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>,
	Dmitry Shmidt <dimitrysh@...gle.com>,
	Elliott Hughes <enh@...gle.com>,
	Android Kernel Team <kernel-team@...roid.com>,
	LSM List <linux-security-module@...r.kernel.org>,
	SELinux <selinux@...ho.nsa.gov>
Subject: Re: [RFC][PATCH 2/2 v2] security: Add task_settimerslack LSM hook

On Fri, Jul 15, 2016 at 10:51 AM, Nick Kralevich <nnk@...gle.com> wrote:
> On Fri, Jul 15, 2016 at 10:24 AM, John Stultz <john.stultz@...aro.org> wrote:
>> As requested, this patch implements a task_settimerslack LSM hook
>> so that the /proc/<tid>/timerslack_ns interface can have finer
>> grained security policies applied to it.
>>
>> Don't really know what I'm doing here, so close review would be
>> appreciated!
>>
>> 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>
>> Signed-off-by: John Stultz <john.stultz@...aro.org>
>> ---
>> v2: Initial swing at adding LSM hook
>>
>>  fs/proc/base.c            | 7 +++++++
>>  include/linux/lsm_hooks.h | 7 +++++++
>>  include/linux/security.h  | 6 ++++++
>>  security/security.c       | 7 +++++++
>>  security/selinux/hooks.c  | 6 ++++++
>>  5 files changed, 33 insertions(+)
>>
>> diff --git a/fs/proc/base.c b/fs/proc/base.c
>> index 8f4f8d7..7f10b37 100644
>> --- a/fs/proc/base.c
>> +++ b/fs/proc/base.c
>> @@ -2284,6 +2284,12 @@ static ssize_t timerslack_ns_write(struct file *file, const char __user *buf,
>>         if (!p)
>>                 return -ESRCH;
>>
>> +       err = security_task_settimerslack(current, slack_ns);
>
> The first argument should be "p", not "current". "p" is the target
> process you're trying to adjust.

Ah, yes. Thanks. Clearly I don't know what I'm doing here. :)
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ