[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151109210608.GH26584@1wt.eu>
Date: Mon, 9 Nov 2015 22:06:08 +0100
From: Willy Tarreau <w@....eu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jann Horn <jann@...jh.net>, Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
James Morris <james.l.morris@...cle.com>,
"Serge E. Hallyn" <serge.hallyn@...ntu.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Joe Perches <joe@...ches.com>,
Thomas Gleixner <tglx@...utronix.de>,
Michael Kerrisk <mtk.manpages@...il.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-security-module@...r.kernel.org, linux-api@...r.kernel.org,
security@...nel.org, Kees Cook <keescook@...gle.com>
Subject: Re: [PATCH] ptrace: use fsuid, fsgid, effective creds for fs access checks
On Mon, Nov 09, 2015 at 12:55:54PM -0800, Andrew Morton wrote:
> > --- a/fs/proc/array.c
> > +++ b/fs/proc/array.c
> > @@ -395,7 +395,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
> >
> > state = *get_task_state(task);
> > vsize = eip = esp = 0;
> > - permitted = ptrace_may_access(task, PTRACE_MODE_READ | PTRACE_MODE_NOAUDIT);
> > + permitted = ptrace_may_access(task,
> > + PTRACE_MODE_READ | PTRACE_MODE_NOAUDIT | PTRACE_MODE_FSCREDS);
>
> There's lots of ugliness in the patch to do with fitting code into 80 cols.
> Can we do
>
> #define PTRACE_foo (PTRACE_MODE_READ|PTRACE_MODE_FSCREDS)
>
> to avoid all that?
Or even simply bypass the 80-cols rule. Making code ugly or less easy
to read for sake of an arbitrary rule is often not fun, and that's even
more so when it comes to security fixes that people are expected to
easily understand next time they put their fingers there.
Willy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists