Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 16 Dec 2013 17:52:01 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Djalal Harouni <tixxdz@...ndz.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, 
	Andrew Morton <akpm@...ux-foundation.org>, Al Viro <viro@...iv.linux.org.uk>, 
	"Eric W. Biederman" <ebiederm@...ssion.com>, Kees Cook <keescook@...omium.org>, 
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH 2/2] procfs: make /proc/*/pagemap 0400

On Sun, Dec 15, 2013 at 10:57 AM, Djalal Harouni <tixxdz@...ndz.org> wrote:
> The /proc/*/pagemap contain sensitive information and currently its
> mode is 0444. Change this to 0400, so the VFS will prevent unprivileged
> processes from getting file descriptors on arbitrary privileged
> /proc/*/pagemap files.
>

Looks good.

Acked-by: Andy Lutomirski <luto@...capital.net>

> Cc: Eric W. Biederman <ebiederm@...ssion.com>
> Cc: Kees Cook <keescook@...omium.org>
> Signed-off-by: Djalal Harouni <tixxdz@...ndz.org>
> ---
>  fs/proc/base.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index e69df4b..081d055 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2616,7 +2616,7 @@ static const struct pid_entry tgid_base_stuff[] = {
>  #ifdef CONFIG_PROC_PAGE_MONITOR
>         REG("clear_refs", S_IWUSR, proc_clear_refs_operations),
>         REG("smaps",      S_IRUGO, proc_pid_smaps_operations),
> -       REG("pagemap",    S_IRUGO, proc_pagemap_operations),
> +       REG("pagemap",    S_IRUSR, proc_pagemap_operations),
>  #endif
>  #ifdef CONFIG_SECURITY
>         DIR("attr",       S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
> @@ -2954,7 +2954,7 @@ static const struct pid_entry tid_base_stuff[] = {
>  #ifdef CONFIG_PROC_PAGE_MONITOR
>         REG("clear_refs", S_IWUSR, proc_clear_refs_operations),
>         REG("smaps",     S_IRUGO, proc_tid_smaps_operations),
> -       REG("pagemap",    S_IRUGO, proc_pagemap_operations),
> +       REG("pagemap",    S_IRUSR, proc_pagemap_operations),
>  #endif
>  #ifdef CONFIG_SECURITY
>         DIR("attr",      S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
> --
> 1.7.11.7
>



-- 
Andy Lutomirski
AMA Capital Management, LLC

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.