LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Cc: James Morris <jmorris@namei.org>,
	Eric Paris <eparis@parisplace.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
	Dave Chinner <dchinner@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	selinux <selinux@tycho.nsa.gov>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 2/2] RFC: selinux: sysctl: fix selinux labeling broken by last patch
Date: Mon, 31 Jan 2011 11:59:35 -0500	[thread overview]
Message-ID: <1296493175.26427.37.camel@moss-pluto> (raw)
In-Reply-To: <AANLkTimt5sxmgUmn-i-WcgMN4d0X00YVMujsA4QgS8nX@mail.gmail.com>

On Mon, 2011-01-31 at 18:27 +0200, Lucian Adrian Grijincu wrote:
> There are now fewer differences than before, but I'd like to point
> something out: *without* the patches files in /proc/sys/* get labeled
> like this.
> -r--r--r-- unknown                          /proc/sys/fs/file-nr
> -rw-r--r-- unknown                          /proc/sys/debug/exception-trace
> -rw-r--r-- unknown                          /proc/sys/dev/cdrom/autoclose
> -rw-r--r-- unknown                          /proc/sys/kernel/sem
> -rw-r--r-- unknown
> /proc/sys/net/ipv4/conf/all/accept_local
> 
> but with the patches:
> -r--r--r-- system_u:object_r:sysctl_fs_t:s0 /proc/sys/fs/file-nr
> -rw-r--r-- system_u:object_r:sysctl_t:s0    /proc/sys/debug/exception-trace
> -rw-r--r-- system_u:object_r:sysctl_dev_t:s0 /proc/sys/dev/cdrom/autoclose
> -rw-r--r-- system_u:object_r:sysctl_kernel_t:s0 /proc/sys/kernel/sem
> -rw-r--r-- system_u:object_r:sysctl_net_t:s0
> /proc/sys/net/ipv4/conf/all/accept_local
> 
> 
> There seem to be no labeling mismatches elsewhere. So either sysctl
> labeling is broken in 2.6.37 or my test setup is broken.

/proc/sys inode labeling was disabled earlier (hence marked S_PRIVATE)
when /proc/sys was reimplemented by Eric, so all access control
on /proc/sys was switched to using the sysctl hook rather than the
inode-based checking.  That's why you don't get a result from ls -Z
on /proc/sys on current kernels.  Getting actual labeling working again
for those inodes would be a win, so your patch is an improvement in that
regard for selinux.

-- 
Stephen Smalley
National Security Agency


  reply	other threads:[~2011-01-31 17:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31  3:26 Lucian Adrian Grijincu
2011-01-31 13:59 ` Stephen Smalley
2011-01-31 14:14   ` Lucian Adrian Grijincu
2011-01-31 14:21     ` Stephen Smalley
2011-01-31 16:27   ` Lucian Adrian Grijincu
2011-01-31 16:59     ` Stephen Smalley [this message]
2011-01-31 17:03       ` Lucian Adrian Grijincu
2011-01-31 18:35         ` Stephen Smalley
2011-01-31 19:55           ` Stephen Smalley

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=1296493175.26427.37.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --cc=arnd@arndb.de \
    --cc=dchinner@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=eparis@parisplace.org \
    --cc=hch@lst.de \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lucian.grijincu@gmail.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH 2/2] RFC: selinux: sysctl: fix selinux labeling broken by last patch' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).