All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	Greg Kroah-Hartman <gregkh@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-security-module@vger.kernel.org
Subject: Re: [RFC 0/5 v4] procfs: introduce hidepid=, hidenet=, gid= mount options
Date: Wed, 29 Jun 2011 23:16:15 +0400	[thread overview]
Message-ID: <20110629191615.GA9343@albatros> (raw)
In-Reply-To: <20110622064545.GA3605@albatros>

On Wed, Jun 22, 2011 at 10:45 +0400, Vasiliy Kulikov wrote:
> > This all seems highly specific to one particular set of requirements. 
> 
> Yes, I admit this.  The problem with procfs is that it's possible to
> chmod/chown some procfs files, but not /proc/PID/*.  Even if make it
> possible to chmod/chown them (and introducing an inodes revalidation on
> execve() setuid and similar binaries) it is still racy - new processes
> would have /proc/PID/ and some files inside with perms=0555.  So, for
> more generic mechanism something like umask is needed.  The patch in
> question implements 2 border cases:
> 
> 1) relaxed.  umask=0555.
> 
> 2) restricted.  umask=0550 (with tricky gid) and files are still not
> chmod'able.
> 
> 
> More generic solution (I'm not suggesting it, but merely discussing)
> would use some user-supplied set of files to restrict access to (or,
> better, the set of allowed files because white list is almost always
> better than black list).  Maybe this one:
> 
>     mount -t proc -o "pid_allow=exe,status,comm,oom_*" proc /proc

Does this scheme make sense?  Should I rensend the patch with these
architecture?

pid_allow=, tid_allow=, attr_allow= and watch_gid= or smth like that.


Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

WARNING: multiple messages have this Message-ID (diff)
From: Vasiliy Kulikov <segoon@openwall.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com,
	Greg Kroah-Hartman <gregkh@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-security-module@vger.kernel.org
Subject: [kernel-hardening] Re: [RFC 0/5 v4] procfs: introduce hidepid=, hidenet=, gid= mount options
Date: Wed, 29 Jun 2011 23:16:15 +0400	[thread overview]
Message-ID: <20110629191615.GA9343@albatros> (raw)
In-Reply-To: <20110622064545.GA3605@albatros>

On Wed, Jun 22, 2011 at 10:45 +0400, Vasiliy Kulikov wrote:
> > This all seems highly specific to one particular set of requirements. 
> 
> Yes, I admit this.  The problem with procfs is that it's possible to
> chmod/chown some procfs files, but not /proc/PID/*.  Even if make it
> possible to chmod/chown them (and introducing an inodes revalidation on
> execve() setuid and similar binaries) it is still racy - new processes
> would have /proc/PID/ and some files inside with perms=0555.  So, for
> more generic mechanism something like umask is needed.  The patch in
> question implements 2 border cases:
> 
> 1) relaxed.  umask=0555.
> 
> 2) restricted.  umask=0550 (with tricky gid) and files are still not
> chmod'able.
> 
> 
> More generic solution (I'm not suggesting it, but merely discussing)
> would use some user-supplied set of files to restrict access to (or,
> better, the set of allowed files because white list is almost always
> better than black list).  Maybe this one:
> 
>     mount -t proc -o "pid_allow=exe,status,comm,oom_*" proc /proc

Does this scheme make sense?  Should I rensend the patch with these
architecture?

pid_allow=, tid_allow=, attr_allow= and watch_gid= or smth like that.


Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

  parent reply	other threads:[~2011-06-29 19:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 18:51 [RFC 0/5 v4] procfs: introduce hidepid=, hidenet=, gid= mount options Vasiliy Kulikov
2011-06-15 18:51 ` [kernel-hardening] " Vasiliy Kulikov
2011-06-16  8:50 ` Arnd Bergmann
2011-06-16  8:50   ` [kernel-hardening] " Arnd Bergmann
2011-06-16  8:58   ` Vasiliy Kulikov
2011-06-16  8:58     ` [kernel-hardening] " Vasiliy Kulikov
2011-06-16 11:40     ` Arnd Bergmann
2011-06-16 11:40       ` [kernel-hardening] " Arnd Bergmann
2011-06-16 13:33       ` Vasiliy Kulikov
2011-06-16 13:33         ` [kernel-hardening] " Vasiliy Kulikov
2011-10-30 17:09       ` richard -rw- weinberger
2011-10-30 17:09         ` [kernel-hardening] " richard -rw- weinberger
2011-06-21 22:31 ` Andrew Morton
2011-06-21 22:31   ` [kernel-hardening] " Andrew Morton
2011-06-22  6:45   ` Vasiliy Kulikov
2011-06-22  6:45     ` [kernel-hardening] " Vasiliy Kulikov
2011-06-22 10:17     ` Vasiliy Kulikov
2011-06-22 10:17       ` [kernel-hardening] " Vasiliy Kulikov
2011-06-29 19:16     ` Vasiliy Kulikov [this message]
2011-06-29 19:16       ` Vasiliy Kulikov
2011-07-06 11:25       ` Alexey Dobriyan
2011-07-06 11:25         ` [kernel-hardening] " Alexey Dobriyan

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=20110629191615.GA9343@albatros \
    --to=segoon@openwall.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=gregkh@suse.de \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.