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: <20140527111806.GA3148@dztty>
Date:	Tue, 27 May 2014 12:18:06 +0100
From:	Djalal Harouni <tixxdz@...ndz.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Kees Cook <keescook@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux FS Devel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 6/9] procfs: add pid_seq_private struct to handle
 /proc/<pid>/{stat|stack}

On Mon, May 26, 2014 at 10:02:15AM -0700, Andy Lutomirski wrote:
> On Mon, May 26, 2014 at 6:27 AM, Djalal Harouni <tixxdz@...ndz.org> wrote:
> > This patch is preparation to handle sensitive ONE entries:
> > /proc/<pid>/stat
> > /proc/<pid>/stack
> >
> > These files use sequence iterators and we want to keep that logic, and
> > their internal handler semantics.
> >
> > The sequence iterators stock the inode in the seq_file->private field,
> > so in order to keep the semantic and to make the cached permission
> > checks available during ->read(), we add the 'pid_seq_private' struct
> > that contains both the inode and the cached permission. It will be the
> > one referenced in the seq_file->private.
> >
> > This way the internal handlers of /proc/<pid>/{stat|stack} wont change.
> >
> > Signed-off-by: Djalal Harouni <tixxdz@...ndz.org>
> > ---
> >  fs/proc/internal.h | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/fs/proc/internal.h b/fs/proc/internal.h
> > index f5c452c..f28e4f01 100644
> > --- a/fs/proc/internal.h
> > +++ b/fs/proc/internal.h
> > @@ -78,6 +78,17 @@ struct proc_inode {
> >         struct inode vfs_inode;
> >  };
> >
> > +/*
> > + * Struct used by some /proc/<pid>/$entries that use sequence
> > + * iterators.
> > + * This struct will be saved in seq_file->private so seq handlers
> > + * can access the inode and the cached permission checks of ->open().
> > + */
> > +struct pid_seq_private {
> > +       int permitted;
> > +       struct inode *inode;
> > +};
> > +
> >  typedef int (*proc_read_fn_t)(char *page,
> >                               struct task_struct *task, int permitted);
> 
> int opener_may_ptrace, please.
Ok, I'll change it in v2.

Thanks

-- 
Djalal Harouni
http://opendz.org
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ