mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Djalal Harouni <tixxdz@opendz.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: Re: [PATCH 2/2] procfs: restore 0400 permissions on /proc/*/pagemap
Date: Mon, 26 Aug 2013 09:50:42 -0700	[thread overview]
Message-ID: <87wqn8pfa5.fsf@xmission.com> (raw)
In-Reply-To: <1377534240-13227-2-git-send-email-tixxdz@opendz.org> (Djalal Harouni's message of "Mon, 26 Aug 2013 17:24:00 +0100")

Djalal Harouni <tixxdz@opendz.org> writes:

> Do not give an fd on privileged /proc/*/pagemap files for free.

The same objections apply to this patch as it's predecessor so I won't
repeat them.

Eric

> Restore the previous 0400 mode
>
> Signed-off-by: Djalal Harouni <tixxdz@opendz.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 6b162cd..93a1c89 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2605,7 +2605,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),
> @@ -2943,7 +2943,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),

  reply	other threads:[~2013-08-26 16:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 16:23 [PATCH 1/2] procfs: restore 0400 permissions on /proc/*/{syscall,stack,personality} Djalal Harouni
2013-08-26 16:24 ` [PATCH 2/2] procfs: restore 0400 permissions on /proc/*/pagemap Djalal Harouni
2013-08-26 16:50   ` Eric W. Biederman [this message]
2013-08-26 16:49 ` [PATCH 1/2] procfs: restore 0400 permissions on /proc/*/{syscall,stack,personality} Eric W. Biederman
2013-08-26 17:20   ` Al Viro
2013-08-27 17:24     ` Djalal Harouni
2013-08-28 20:11       ` Djalal Harouni
2013-08-28 20:49         ` Kees Cook
2013-08-28 21:11           ` Djalal Harouni
2013-08-29  0:26             ` Eric W. Biederman
2013-08-29  0:30               ` Kees Cook
2013-08-29  1:08                 ` Eric W. Biederman
2013-08-29  3:33                   ` Kees Cook
2013-08-29  7:42                     ` Eric W. Biederman
2013-08-29  9:11               ` Djalal Harouni
2013-08-29 22:14                 ` Kees Cook
2013-08-31 20:26                   ` Djalal Harouni
2013-09-01  1:44                     ` Eric W. Biederman
2013-09-01 15:04                       ` Kees Cook
2013-09-12  1:23                       ` Djalal Harouni
2013-10-04  0:41           ` Kees Cook
2013-10-04  0:53             ` Ryan Mallon
2013-08-26 20:34   ` Djalal Harouni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqn8pfa5.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tixxdz@opendz.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome